updated zeptosay; embarassingly ugly
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
(load "ascii.zp")
|
||||
(cowsay (string-substitute (string-substitute (fold (lambda (x y) (++ x y)) "" args) "\n" " ") " " " "))
|
||||
(let ((trimmed (|> (delay (string:join zepto:args))
|
||||
(lambda (x) (string:substitute x "\t" " "))
|
||||
string->list
|
||||
list->vector
|
||||
(curry vector:reduce
|
||||
(lambda (acc x) (if (eq? (vector:last acc) x) acc (++ acc x)))
|
||||
{})
|
||||
vector->list
|
||||
list->string)))
|
||||
(ascii:cowsay trimmed))
|
||||
""
|
||||
|
Reference in New Issue
Block a user