Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
94 lines (85 sloc) 2.21 KB
fns:
dyadic monadic
+ add; conjugate
- sub; negate / swap case
× mul; sign / case (i.e. ×'Hi ' → 1 ¯1 0) / ×|map
÷ div; 1÷⍵
* pow; e*⍵
⍟ log; e⍟⍵
√ root; 2√⍵
⌈ max; ceil / uppercase
⌊ min; floor / lowercase
| mod; abs / map size
∧ lcm; lcm (aka every; all truthy)
∨ gcd; gcd (aka some; contains truthy)
⍲ nand; not all / contains falsy
⍱ nor; none / all falsy
⊥ from; 2⊥⍵
⊤ to; 2⊤⍵
○ trig; pi×⍵
! nCk; factorial
monadic dyadic
∊ in; enlist
⍷ NYI; find
⌷ ⊢; index; also values of map
⍳ indexes; where
~ without; negate
⍸ where; NYI; where > 0 (positions replicated n times)
⍴ shape; reshape
, ravel; concat
⍮ ,⊂; {⍺⍵}
≢ not eq; tally (⊃1,⍨⍴⍵)
≡ depth; equal; depth is amount of ⊃s needed to get to a primitive (to be changed)
⊢ ⍵; ⍵
⊣ ⍵; ⍺ (monadic to be changed)
↑ merge; take; merge as in merge dimensions
↓ split; drop; split off last dimension as arrays
? rand; NYI
⍪ table; vertical concat;
⊖ flip; NYI
⌽ reverse; NYI
… NYI; range
⍕ format; NYI
⍎ eval; NYI
⍋ grade up ; NYI
⍒ grade down; NYI
⌿ NYI; replicate
∪ unique; union
∩ NYI; intersection
⊂ NYI; enclose
⊃ first; pick
⊇ first if enclosed; select
⍉ transpose; NYI
< lt; sort asc
≤ le; NYI
= eq; NYI
≥ ge; NYI
> gt; sort desc
≠ ne; NYI
monadic ops:
/ reduce
\ scan
¨ for each
⍨ selfie; commute
⌾ table (aka ∘.⍺⍺; _might_ get removed at some point?)
⌸ get/set map keys (e.g. 'x'(map⌸)5; map⌸'x')
dyadic ops
∘ compose
. NYI
⍣ repeat
⍡ cumulative repeat
⍥ over (←→ {(⍹⍺) ⍶ ⍹⍵} )
⍤ atop (←→ {⍺⍺ ⍺ ⍵⍵ ⍵} )
⍢ under (←→ {⍺←{_←⍺⍺⋄⍵}⋄(⍹⍣¯1) (⍹⍺) ⍶ ⍹⍵} )
⍫ obverse - define inverse: ⍶ - regular function, ⍹ - inverse
@ at; right op = indices or function giving boolean array, left op = replacement array or function
⍁ for each diagonal
nilads:
⍬ 0⍴0
⎕ console (println; exec input line)
⍞ console (print ; input as string)
⍺ left arg
⍵ right arg
⍶ left operand
⍹ right operand
∇ this function
You can’t perform that action at this time.