summary refs log tree commit diff
path: root/lib/contains.fnl
blob: 75275af0396ec2ff02aadc2151549fe939e98c53 (plain)
1
2
3
4
5
6
7
(fn contains [t x]
  (accumulate [found false
               _ v (ipairs t)
               &until found] ; escape early
    (or found (= x v))))

{: contains}