new files
This commit is contained in:
parent
3af7344581
commit
86c034bb8b
1364 changed files with 21352 additions and 0 deletions
5
Task/Search-a-list/Clojure/search-a-list.clj
Normal file
5
Task/Search-a-list/Clojure/search-a-list.clj
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
(let [haystack ["Zig" "Zag" "Wally" "Ronald" "Bush" "Krusty" "Charlie" "Bush" "Bozo"]]
|
||||
(let [idx (.indexOf haystack "Zig")]
|
||||
(if (neg? idx)
|
||||
(throw (Error. "item not found."))
|
||||
idx)))
|
||||
Loading…
Add table
Add a link
Reference in a new issue