Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
24
Task/Empty-string/LFE/empty-string.lfe
Normal file
24
Task/Empty-string/LFE/empty-string.lfe
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
> (set str "")
|
||||
()
|
||||
> (length str)
|
||||
0
|
||||
> (=:= 0 (length str))
|
||||
true
|
||||
> (=:= 0 (length "apple"))
|
||||
false
|
||||
> (=:= "apple" "")
|
||||
false
|
||||
> (=/= "apple" "")
|
||||
true
|
||||
> (=:= str "")
|
||||
true
|
||||
> (=:= "apple" '())
|
||||
false
|
||||
> (=/= "apple" '())
|
||||
true
|
||||
> (=:= str '())
|
||||
true
|
||||
> (case str ('() 'empty) ((cons head tail) 'not-empty))
|
||||
empty
|
||||
> (case "apple" ('() 'empty) ((cons head tail) 'not-empty))
|
||||
not-empty
|
||||
Loading…
Add table
Add a link
Reference in a new issue