JanetDocsPlaygroundI'm feeling luckyGitHub sign in

-



    function

    (- & xs)

    Returns the difference of xs. If xs is empty, returns 0. If xs has 
    one element, returns the negative value of that element. Otherwise, 
    returns the first element in xs minus the sum of the rest of the 
    elements.


3 examplesSign in to add an example
Loading...
(- ;(range 10))
# => -45
sogaiuPlayground
(- 1)
# => -1
sogaiuPlayground
(-)
# => 0
sogaiuPlayground