Last Updated: February 25, 2016
·
479
· mjstahl

Message Pattern examples in Social Machines

A couple examples of messages patterns in my language Social Machines. A huge thanks should go to Phillippe Mougin of Fscript for the inspiration.

AGES := [27. 51. 44. 62. 53. 19. 23. 52. 21.53.35]
"Are they all older than 20"
>> AGES > 20 \ $&
== false

The next example works because Boolean objects implement the '+' behavior, so a Boolean can be added as if True were 1 and False 0.

"How many are over 25 but under 60"
>> AGES > 25 & (AGES < 60) \ $+
== 8