uiua-lang / uiua

A stack-based array programming language
https://www.uiua.org
MIT License
1.53k stars 107 forks source link

Add Advice dialog for when you try to repeat a function 1 times #438

Closed ErikKoev closed 6 months ago

ErikKoev commented 6 months ago

There should be an Advice dialog for when you try to ⍥ repeat a function 1 times saying that ⍥ repeat is redundant in current context.

bkDJ commented 6 months ago

Just my 2 cents, I find that ⍥F Bool can often be less noisy than⟨∘|F⟩ Bool.

kaikalii commented 6 months ago

One problem this has it the fact that switch functions can take arrays as conditions, so they are not always equivalent. Maybe this just means that repeat should be able to take arrays.

kaikalii commented 6 months ago

This has been added in b07bc57f9b9a65c1d9eac1e321