This is the TXR Lisp interactive listener of TXR 233.
Quit with :quit or Ctrl-D on empty line. Ctrl-X ? for cheatsheet.
1> (countq #\h "fhqwhgads")
2
2> [[callf equal identity reverse] "palindrome"]
nil
3> [[callf equal identity reverse] "racecar"]
t
4> [(opip (mappend [iff (op > (countq @1 @@1) 1) list] @1) uniq) "applause"]
"ap"
5> [(opip (mappend [iff (op > (countq @1 @@1) 1) list] @1) uniq) "foo"]
"o"
6> [(opip (mappend [iff (op > (countq @1 @@1) 1) list] @1) uniq) "baz"]
""
7> [[mapf equal sort sort] "teapot" "toptea"]
t
8> [[mapf equal identity sort] "apple" "elap"]
nil
9> [(op mappend [iff (op eql (countq @1 @@1) 1) list] @1) "somewhat heterogeneous"]
"mwa rgnu"
10> [(do and (= (len @1) (len @2)) (search-str `@2@2` @1)) "foobar" "barfoo"]
3
11> [(do and (= (len @1) (len @2)) (search-str `@2@2` @1)) "fboaro" "foobar"]
nil
12> [sort '#"books apple peanut aardvark melon pie" : len]
("pie" "books" "apple" "melon" "peanut" "aardvark")
Yawn ...
13> (perm "xyz") ;; non-recursive, lazy, written in C.
("xyz" "xzy" "yxz" "yzx" "zxy" "zyx")