You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to scal...@googlegroups.com
Yes, using Some and None is possible, it's also very ugly =/ I have yet to figure out a better way of doing this that plays nicely with Scala's type inference. Something like ScalaZ's Boolean.option would be pretty elegant here, and it may be worth defining your own.
Ngoc Dao
unread,
Oct 16, 2014, 4:48:16 PM10/16/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to scal...@googlegroups.com
It seems that the simple solution is just use empty string to express the empty node:
Stewart Stewart
unread,
Feb 11, 2015, 9:59:58 PM2/11/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to scal...@googlegroups.com
I'm a bit late to this party, but I've been using the following:
div(if(condition) div else())
It typechecks and works as expected, ie., it returns either an empty div or a nested div. Please not that the infered type of the `if` expression is `Any` if this isn't written where a `Modifier` is expected.
Landlocked Surfer
unread,
Jan 15, 2016, 4:49:10 AM1/15/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Scalatags
Thanks for the tip Steward. That's a solution I find very elegant.
Just wanted to share that this works nicely with attributes also: