Scala: curried constructors?

This will work: def mkPerson = (new Person(_, _, _)).curried.

1, but you shouldn't need those type ascriptions. Def mkPerson = (new Person(_, _, _)). Curried – pelotom Oct 5 '10 at 17:04 1 Oh, indeed.

I thought I needed them because of weird constructor thingies. – Daniel C. Sobral Oct 5 '10 at 20:31 Just a quick note, if you're sure to call it may as well make it val mkPerson = .... Also, if Person were a case class you could simply use (Person.

Apply _). Curried – Geoff Reedy Oct 5 '10 at 22:13 Thanks a lot. This is indeed a lot more concise.

– Chris Eidhof Oct 5 '10 at 13:15.

May be so: val mkPerson = Function. Curried((n: String,a:Int,e:String) => new Person (n,a,e)).

I see. It's still more complex than I'd hoped for: I was thinking of something more along the lines of Haskell constructors. – Chris Eidhof Oct 5 '10 at 14:36.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions