# HG changeset patch # User Michael Pavone # Date 1428173686 25200 # Node ID 1458c069c715ef6c52ec4a93dbe0813403d4347b # Parent b8f721bde066bce0fbba4a67744c8833e1a0bace Added "value" method to option value and option none. It behaves similarly to value:none, except the none case just propagates the none value and the value case wraps the result in an option value diff -r b8f721bde066 -r 1458c069c715 modules/option.tp --- a/modules/option.tp Fri Apr 03 23:08:19 2015 -0700 +++ b/modules/option.tp Sat Apr 04 11:54:46 2015 -0700 @@ -3,6 +3,7 @@ value:none <- :ifval :ifnone { ifnone: } + value <- :ifval { self } value? <- { false } none? <- { true } } @@ -12,6 +13,9 @@ value:none <- :ifval :ifnone { ifval: v } + value <- :ifval { + option value: (ifval: ) + } value? <- { true } none? <- { false } }