Methods

initΒΆ

init(b:FullBox, val:Any)

FullBox constructor. Saves val into .val
Source: stdlib.ngs:1939

Example

# Simplified code from the_one() method:
ret = EmptyBox()
something.each(F(elt) {
	if predicate(elt) {
		ret throws TheOneFail("the_one() had more than one match")
		ret = FullBox(elt)
	}
})
not(ret) throws TheOneFail("the_one() had no matches")
ret.val # Has the value