# 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

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

4,126 People

• ##### London Software Craftsmanship Community

4,344 Software Crafters

• ##### LJC - London Java Community

6,622 Java Developers

• ##### London Dev Community

2,628 Developer, Manager, Architect

• ##### London IT Contractors Group

1,164 Members

• ##### London μServices (Microservices)­ User Group

3,099 μServicers