UFCS.k 254 B

12345678910111213
  1. invoke {
  2. let pair = .{ [.x,.y] }
  3. let p = 1 -> pair(2)
  4. assert p is List
  5. assert p[0] == 1 && p[1] == 2
  6. let double = .{ .x*2 }
  7. assert 3 -> double == 6
  8. invoke {
  9. let double = Number
  10. assert 5 -> double == 10
  11. }
  12. }