Advertisement
phi2dao

Ormr

Oct 24th, 2023 (edited)
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. arg1.func
  2. arg1.func(arg2 arg3)
  3. arg1.func(inline_arg | inline_function_body)
  4. arg1 op arg2
  5. { nilary_function_body }
  6. { arg1 arg2 | function_body }
  7. arg1.{ ... }(arg2 arg3)
  8. (arg op) #=> { a | arg op a } # partial application
  9. 'func #=> { a b | a.func } # K combinator
  10. [item1 item2]
  11. array[index1 index2]
  12. name = value
  13.  
  14. arg.over(binary unary) #=> arg.binary(arg.unary)
  15. arg.fork(unary1 binary unary2) #=> arg.unary1.binary(arg.unary2)
  16.  
  17. rot = { a | a.reverse.transpose }
  18. f = { a f | 4.range.rows('a).scan('rot).rows(f).reverse.scan('rot).mix }
  19. g = { a | a > (`1.keep(a.length) , a.scan(max).drop(`1)) }
  20. data.f(g).reduce(max).ravel.reduce(+)
  21.  
  22. # length of longest consecutive sequence
  23. lcs = {a | a.over(select rise).unique.windows(2).rows(reduce(-)).over(partition (==`1)).rows(length).reduce(max) + 1}
  24. if((data.length < 2) data.length data.lcs)
  25.  
  26. # palindrome
  27. data.downcase.over(keep member(&A, &D)).over(match reverse)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement