# Re: [lsug] Ideas for tomorrow's Dojo

 From: Andy H. Sent on: Tuesday, April 24, 2012 3:18 PM
Hi,

I've just purchased the ' Scala for the Impatient' book. This has some exercises at the end of each chapter that we may be able to use. A couple of random exercises are

Write a function that turns an array of Double values into a two- dimensional array. Pass the number of columns as a parameter. For example, with Array(1, 2, 3, 4, 5, 6) and three columns, return Array(Array(1, 2, 3), Array(4, 5, 6)). Use the grouped method.

Write an object Conversions with methods inchesToCentimeters, gallonsToLiters, and milesToKilometers.

Jim - I've had a look at the Parsing chapter. It looks like it does through how to write a calculator and the exercise is to add / and % to the code, so maybe able to modify and could be interesting.

I'll bring the book tomorrow
andy

Hi,

I spoke to someone about a problem I am having with combinator parsing here is the main part of what I said:

I want to build a desktop calculator in Scala, similar to the example given in Bjarne Stroustrop's C++ book. Here is a link to the C++ code.

I have had a look at the Combinator Parsing chapter in "Programming in Scala" and the Arithmetic expressions example. I copied the code and can parse arithmetic expressions such as 7 + 3 * 6. The parser tells me if the expression is valid or not but what I would like to do is calculate the value of the expression.

I have something that can calculate the values of arithmetic expressions using case classes based on the Expr classes in the pattern matching chapter.

Would something like this be a suitable problem?

Thanks

Jim

Hey everyone.
Any ideas for tomorrow's Dojo or are we doing the code katas again?

Cheers
Paweł

--
http://www.meetup.com/london-scala/
This message was sent by Pawel Krupinski ([address removed]) from London Scala Users' Group.
Set my mailing list to email me

As they are sent
http://www.meetup.com/london-scala/list_prefs/?pref=1

In one daily email
http://www.meetup.com/london-scala/list_prefs/?pref=2

Don't send me mailing list messages
http://www.meetup.com/london-scala/list_prefs/?pref=0
Meetup, PO Box 4668 #37895 New York, New York[masked] | [address removed]

--
This message was sent by Jim Collins ([address removed]) from London Scala Users' Group.
Set my mailing list to email me As they are sent | In one daily email | Don't send me mailing list messages

Meetup, PO Box 4668 #37895 New York, New York[masked] | [address removed]

### London, United Kingdom

Founded Nov 28, 2009

#### Organizers:

• ##### Scala Dojo

Web site for monthly Scala Dojo

• ##### Scala Jobs

Google Group of Scala Jobs in the London Area

• ##### Scalar Conf

16 April 2016 in Warsaw, Poland

• ##### _.underscore

Scala consultants, trainers, and developers, based in London, UK

• ##### Springer

Help and supporters of the monthly dojo

• ##### Skills Matter

Provide the venue for many of our meetings.

• ##### Mind Candy

Help with the Adv Scala Meet-up

#### People in this Meetup are also in:

• ##### Developers & Entrepreneurs

5,549 Developers & Entrepreneurs

• ##### The London Android Group - Londroid

3,675 Android Explorers

• ##### Data Science London

6,356 Data Scientists

• ##### London MongoDB User Group

1,520 Members

• ##### F#unctional Londoners Meetup Group

1,105 Members