sourcedemos/sub.xtl

1⍝!/usr/bin/env xetal 2⍝# A dyadic user function; every function is curried. Run it with 3⍝# ./demos/sub.xtl or "xetal run demos/sub.xtl"; it prints 7 twice, from 4⍝# 10 ᵘs̲ub 3 and from the partial application u:t_enMinus. 5 6⍝# a u:s_ub b: a minus b. 7ᵘs̲ub ← { ⍺ − ⍵ } 810 ᵘs̲ub 3 9⍝# u:t_enMinus x: 10 minus x, u:s_ub with its left argument fixed at 10. 10ᵘt̲enMinus ← ᵘs̲ub 10 ⍝ partial application fixes the left argument 11ᵘt̲enMinus 3