« Return to Thread: something like Clojure's "doto"?

Re: something like Clojure's "doto"?

by Raoul Duke :: Rate this Message:

Reply to Author | View in Thread

> scala> def doto[A](a: A)(todos: (A=>Any)*) = todos.foldLeft(a){
> (a,todo) => todo(a); a }

many thanks! i suspect i'll be unraveling that a while :-) i mean, i
do get the gist, i'm just behind on what-all Scala can do.

 « Return to Thread: something like Clojure's "doto"?