Hi, one more version handling correctly Return and Exit.
pif: func [[throw]
{polymorphic if with lazy evaluation and minimal checking}
args [block!] /local cond blk r result
] [
result: false
while [not empty? args] [
either cond: first r: do/next args [
either logic? cond [
r: do/next second r
if not unset? blk: first r [
result: do blk
]
] [
result: do cond
]
args: tail args
] [
r: do/next second r
args: second r
]
]
result
]
- [REBOL] wanna help me "cheat?" tf
- [REBOL] wanna help me "cheat?" Re: tf
- [REBOL] Polymorphic lmecir
- [REBOL] Polymorphic Re:(3) Al . Bri
- [REBOL] Polymorphic Re:(4) lmecir
- [REBOL] Polymorphic Re:(6) lmecir
- [REBOL] Polymorphic Re:(6) joel . neely
- [REBOL] Polymorphic Re:(7) Al . Bri
- [REBOL] Re: Polymorphic Re:(6) giesse
- [REBOL] Polymorphic Re:(8) joel . neely
- [REBOL] Polymorphic Re:(4) lmecir
- [REBOL] Polymorphic Re: joel . neely
