(defconst nums [4 i32] [4 8 15 16]) ;; `some` unwraps Some and early-returns None from *this* function. (defn doubled-first [s [i32]] (Option i32) (Some (* 2 (some (index-of s 15))))) (defn main [] () (match (doubled-first (slice nums 0 4)) (Some i) (do (print i) (println "")) ; 4 None (println "not found")) (match (index-of (slice nums 0 4) 99) (Some i) (do (print i) (println "")) None (println "not found")))