JanetDocsSourcePlaygroundI'm feeling luckyCommunityGitHub sign in

has-value?

core-api


    function
    boot.janet on line 1302, column 1

    (has-value? ds value)

    Check if a data structure `ds` contains the value `value`. Will run 
    in time proportional to the size of `ds`.


1 exampleSign in to add an example
Loading...
(defn array-difference [array-1 array-2]
  (filter |(not (has-value? array-2 $)) array-1))

(array-difference [1 2 3 4 5] [2 3 4]) # => @[1 5]
veqqqPlayground