K: Difference between revisions

Jump to navigation Jump to search
468 bytes removed ,  14:41, 16 March 2020
no edit summary
No edit summary
No edit summary
Line 56: Line 56:
! Verb                            !! Monadic                          !! Dyadic                                !! Triadic          !! Tetradic
! Verb                            !! Monadic                          !! Dyadic                                !! Triadic          !! Tetradic
|-
|-
| <source lang=k inline>+</source> || flip ([[Transpose]])            || [[plus]]                              ||                  ||
| <code>+</code> || flip ([[Transpose]])            || [[plus]]                              ||                  ||
|-
|-
| <source lang=k inline>-</source> || [[negate]]                      || [[minus]]                              ||                  ||
| <code>-</code> || [[negate]]                      || [[minus]]                              ||                  ||
|-
|-
| <source lang=k inline>*</source> || [[first]]                        || [[times]]                              ||                  ||
| <code>*</code> || [[first]]                        || [[times]]                              ||                  ||
|-
|-
| <source lang=k inline>%</source> || [[reciprocal]]                  || [[divide]]                            ||                  ||
| <code>%</code> || [[reciprocal]]                  || [[divide]]                            ||                  ||
|-
|-
| <source lang=k inline>|</source> || [[reverse]]                      || [[max]]|[[or]]                        ||                  ||
| <code>|</code> || [[reverse]]                      || [[max]]|[[or]]                        ||                  ||
|-
|-
| <source lang=k inline>&</source> || [[where]]                        || [[min]]|[[and]]                        ||                  ||
| <code>&</code> || [[where]]                        || [[min]]|[[and]]                        ||                  ||
|-
|-
| <source lang=k inline>^</source> || [[shape]]                        || [[power]]                              ||                  ||
| <code>^</code> || [[shape]]                        || [[power]]                              ||                  ||
|-
|-
| <source lang=k inline>!</source> || enumerate (includes [[Iota]])    || [[rotate]]|[[mod]]                    ||                  ||
| <code>!</code> || enumerate (includes [[Iota]])    || [[rotate]]|[[mod]]                    ||                  ||
|-
|-
| <source lang=k inline><</source> || [[grade up]]                    || [[less than]]                          ||                  ||
| <code><</code> || [[grade up]]                    || [[less than]]                          ||                  ||
|-
|-
| <source lang=k inline>></source> || [[grade down]]                  || [[greater than]]                      ||                  ||
| <code>></code> || [[grade down]]                  || [[greater than]]                      ||                  ||
|-
|-
| <source lang=k inline>=</source> || [[group]]                        || [[equals]]                            ||                  ||
| <code>=</code> || [[group]]                        || [[equals]]                            ||                  ||
|-
|-
| <source lang=k inline>~</source> || [[not]], attribute              || [[match]]                              ||                  ||
| <code>~</code> || [[not]], attribute              || [[match]]                              ||                  ||
|-
|-
| <source lang=k inline>@</source> || [[atom]]                        || [[Index function|at index]]            ||  [[amend]]/trap  ||  [[amend]]
| <code>@</code> || [[atom]]                        || [[Index function|at index]]            ||  [[amend]]/trap  ||  [[amend]]
|-
|-
| <source lang=k inline>?</source> || range ([[Unique]])              || function inverse/find/draw/deal/sample ||  invert-guess    ||
| <code>?</code> || range ([[Unique]])              || function inverse/find/draw/deal/sample ||  invert-guess    ||
|-
|-
| <source lang=k inline>_</source> || [[floor]]                        || [[drop]]|[[Cut (K)|cut]]              ||                  ||
| <code>_</code> || [[floor]]                        || [[drop]]|[[Cut (K)|cut]]              ||                  ||
|-
|-
| <source lang=k inline>,</source> || enlist (like [[Enclose]])        || [[Catenate|join]]                      ||                  ||
| <code>,</code> || enlist (like [[Enclose]])        || [[Catenate|join]]                      ||                  ||
|-
|-
| <source lang=k inline>#</source> || [[count]]                        || [[take]]|[[reshape]]                  ||                  ||
| <code>#</code> || [[count]]                        || [[take]]|[[reshape]]                  ||                  ||
|-
|-
| <source lang=k inline>$</source> || [[format]]                      || dollar (conversions)                  ||                  ||
| <code>$</code> || [[format]]                      || dollar (conversions)                  ||                  ||
|-
|-
| <source lang=k inline>.</source> || make/unmake dictionary          || dot index                              ||  [[amend]]/trap  ||  [[amend]]
| <code>.</code> || make/unmake dictionary          || dot index                              ||  [[amend]]/trap  ||  [[amend]]
|-
|-
| <source lang=k inline>:</source> || colon                            || [[assignment]]                        ||                  ||
| <code>:</code> || colon                            || [[assignment]]                        ||                  ||
|}
|}


Line 100: Line 100:
! Adverb                            !! Definition
! Adverb                            !! Definition
|-
|-
| <source lang=k inline>/</source>  || over (incudes [[Reduce]] and [[Power operator|Power]])
| <code>/</code>  || over (incudes [[Reduce]] and [[Power operator|Power]])
|-
|-
| <source lang=k inline>\</source>  || [[scan]]
| <code>\</code>  || [[scan]]
|-
|-
| <source lang=k inline>'</source>  || [[each]]
| <code>'</code>  || [[each]]
|-
|-
| <source lang=k inline>/:</source> || each right
| <code>/:</code> || each right
|-
|-
| <source lang=k inline>\:</source> || each left
| <code>\:</code> || each left
|-
|-
| <source lang=k inline>':</source> || eachpair (like [[Windowed Reduce]])
| <code>':</code> || eachpair (like [[Windowed Reduce]])
|}
|}
==External links==
==External links==
* [https://ngn.bitbucket.io/k.html Overview of K implementations]
* [https://ngn.bitbucket.io/k.html Overview of K implementations]
{{APL dialects}}
{{APL dialects}}

Navigation menu