view modules/option.tp @ 347:ff7ea11b4b60

Add length method to executable bytearrays
author Michael Pavone <pavone@retrodev.com>
date Fri, 10 Apr 2015 00:48:12 -0700
parents fd4e0bf5bd9f
children
line wrap: on
line source
{
	_none <- #{
		value:none <- :ifval :ifnone {
			ifnone:
		}
		value <- :ifval { self }
		value? <- { false }
		none? <- { true }
	}
	#{
		value <- :v {
			#{
				value:none <- :ifval :ifnone {
					ifval: v
				}
				value <- :ifval {
					option value: (ifval: v)
				}
				value? <- { true }
				none? <- { false }
			}
		}
		none <- { _none }
	}
}