random   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/core/adt.xtm

Implementation

(bind-func random:[!a,List{!a}*]*
  (lambda (lst)
    (let ((lgth (length lst))
          (idx:i64 (random lgth)))
      (nth lst idx))))


Back to Index

Similar Entries