Uiua: Difference between revisions

Jump to navigation Jump to search
1,111 bytes added ,  28 January
no edit summary
No edit summary
No edit summary
Line 33: Line 33:
All table below are based on Uiua version 0.8.0-1/28/2024.
All table below are based on Uiua version 0.8.0-1/28/2024.


And <span style="color:black; background-color: yellow">yellow background text </span> mean that the glyph is deprecated and will be removed in a future version  
<span style="color:black; background-color: yellow">Yellow background text </span> mean that the glyph is deprecated and will be removed in a future version  


And 🧪 emoji mean that the glyph is experimental and may be changed or removed in the future.
==== Stack ====
==== Stack ====
Work with the stack
Work with the stack
Line 273: Line 274:
Keys <code>≤0</code> will be omitted.
Keys <code>≤0</code> will be omitted.
The function then processes each group in order. The result depends on what the function is.
The function then processes each group in order. The result depends on what the function is.
If the function takes 0 or 1 arguments, then <code>⊜ partition</code> behaves like ≡ rows. This is called iterating ⊜ partition.
If the function takes 0 or 1 arguments, then <code>⊜ partition</code> behaves like ≡ rows. This is called iterating <code>⊜ partition.</code>
|}
|}
==== Inversion Modifiers ====
==== Inversion Modifiers ====
Line 279: Line 280:
{| class="wikitable"
{| class="wikitable"
|+ Table of Iterating Modifiers in Uiua
|+ Table of Iterating Modifiers in Uiua
! Glyph !! Name !! Definition
! Glyph !! Name !! Type !! Definition
|-
| <code>°</code> || [[Un]] || Monadic modifier || Invert the behavior of a function
Most functions are not invertible.
|-
| <code>⌅</code> || <span style="color:black; background-color: yellow">🧪[[Rectify]]</span> || Monadic modifier ||🧪Set a function as its own inverse
|-
| <code>⍜</code> || [[Under]] || Dyadic modifier || Apply a function under another
This is a more powerful version of <code>° un.</code>
Conceptually, <code>⍜ under</code> transforms a value, modifies it, then reverses the transformation.
 
<code>⍜ under</code> takes 2 functions <code>f</code> and <code>g</code> and another argument <code>x</code>.
It applies <code>f</code> to <code>x</code>, then applies <code>g</code> to the result.
It then applies the inverse of <code>f</code> to the result of <code>g</code>.
 
Any function that can be <code>° un</code>ed can be used with <code>⍜ under</code>.
Some functions that can't be <code>° un</code>ed can still be used with <code>⍜ under</code>.
|}
== External links ==
== External links ==
* [https://concatenative.org/wiki/view/Uiua Uiua] on the concatenative language wiki
* [https://concatenative.org/wiki/view/Uiua Uiua] on the concatenative language wiki
20

edits

Navigation menu