On Mon, Dec 1, 2008 at 10:24 AM, Alex Boisvert <[EMAIL PROTECTED]> wrote:
> Isn't this similar to Option.mapOrElse that you opposed on the scala
> mailing list? :)
In fact it is. :-)
Polluting Scala is bad. Polluting Lift is less bad.
>
>
> alex
>
>
> On Mon, Dec 1, 2008 at 9:55 AM, David Po
Isn't this similar to Option.mapOrElse that you opposed on the scala mailing
list? :)
alex
On Mon, Dec 1, 2008 at 9:55 AM, David Pollak
<[EMAIL PROTECTED]>wrote:
> I've added def dmap[B](dflt: => B)(f: A => B): B to Cans:
>
> S.param("foo").dmap(5)(toInt)
>
>
> On Fri, Nov 28, 2008 at 6:53 AM,
I've added def dmap[B](dflt: => B)(f: A => B): B to Cans:
S.param("foo").dmap(5)(toInt)
On Fri, Nov 28, 2008 at 6:53 AM, Derek Chen-Becker <[EMAIL PROTECTED]>wrote:
> I have to say, I love this "Can->map->openOr" idiom. I use it all of the
> time in my code for parameter handling, etc.
>
> Derek
I have to say, I love this "Can->map->openOr" idiom. I use it all of the
time in my code for parameter handling, etc.
Derek
On Fri, Nov 28, 2008 at 5:51 AM, Marius <[EMAIL PROTECTED]> wrote:
>
> Yup ... or you can have
>
> val count = S.attr("count").map(_.toInt) openOr 5
>
> Br's,
> Marius
>
>
Yup ... or you can have
val count = S.attr("count").map(_.toInt) openOr 5
Br's,
Marius
On Nov 28, 2:15 pm, Tim Perrett <[EMAIL PROTECTED]> wrote:
> Wow, I cant belive I didnt know about that - thats pretty fricking
> useful!! Presumably:
>
> val count: Int = S.attr("count") match {
>
Wow, I cant belive I didnt know about that - thats pretty fricking
useful!! Presumably:
val count: Int = S.attr("count") match {
case Full(item) => item.toInt
case Empty => 5
}
Is the normal idiom?
Cheers
Tim
On Nov 27, 11:34 pm, Tim Perrett <[EMAIL PROTECTED]> wrote:
> Hm
Hmm interesting! This I'm not familiar with - I'll give it a whirl
tomorow.
Cheers, Derek
Sent from my iPhone
On 27 Nov 2008, at 22:11, "Derek Chen-Becker" <[EMAIL PROTECTED]>
wrote:
> I thought that S.attr could already be used to get the attributes on
> a tag. Am I misunderstanding what
I thought that S.attr could already be used to get the attributes on a tag.
Am I misunderstanding what you're getting at?
Derek
On Thu, Nov 27, 2008 at 11:38 AM, Tim Perrett <[EMAIL PROTECTED]> wrote:
>
> Guys,
>
> Im currently re-designing the whole bloglite publishing engine im
> writing and o