Last active
March 27, 2017 17:31
-
-
Save greggirwin/257592d854db222dfba021052b5dc34a to your computer and use it in GitHub Desktop.
Infix operator you can use like ANY for two args.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [] | |
a-or-b: function [a b][any reduce [a b]] | |
|: make op! :a-or-b | |
example: { | |
>> a-or-b: function [a b][any reduce [a b]] | |
== func [a b][any reduce [a b]] | |
>> |: make op! :a-or-b | |
== make op! [[a b]] | |
>> 1 | 2 | |
== 1 | |
>> none | 2 | |
== 2 | |
>> set [w x y z] [none none none 4] | |
== [none none none 4] | |
>> w | x | y | z | |
== 4 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment