kevinlawler / kona

Open-source implementation of the K programming language
ISC License
1.36k stars 138 forks source link

Fixes #609. Fix doc for move to _draw #610

Closed gitonthescene closed 2 years ago

gitonthescene commented 2 years ago

See note in attached issue. I'm assuming pull requests go to master. If you'd like me to put it on another branch, please let me know.

gitonthescene commented 2 years ago

I'm not sure how you want a demonstration of the fix to be manifested. Please let me know if this does not suffice.

➜  kona git:(master) ✗ ./k                                                                
kona      \ for help. \\ to exit.

  \+
Verbs +-*%|&^!<>=~@?_,#$.:
Verbs work on all sensible types (ints, floats, strings, symbols, lists)
Dyadic or monadic is determined from context, default is dyadic
Add : after a verb to force the monadic form, + is plus, +: is flip
...
@ tetradic dyadic amend. see \.
? dyadic   find. x?y yields index of y in list x (or #x)
? dyadic   invert. {x^2} ? 2 yields sqrt(2) 
? triadic  invert-guess. secant method with clues ?[{2^x};17;4]
_ monadic  floor. tolerant floor function 
...
  \_
Constants:
...
Dyadic Verbs:
...
_dot     dot product
_draw    draw x random numbers from 0 to y-1, negative y indicates without replacement
_dv      delete value
...