[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
comic-book-insult
From: |
Emanuel Berg |
Subject: |
comic-book-insult |
Date: |
Sun, 08 Sep 2019 21:05:35 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
(defun scramble-string (str)
"Randomize the characters of a string."
(interactive "sscramble me: ")
(let*((empty-str "")
(chars (delete empty-str (split-string str empty-str)))
(rand-chars (sort chars (lambda (_ __) (zerop (random 2)))))
(rand-str (mapconcat 'identity rand-chars ""))
)
rand-str) )
(defun comic-book-insult ()
(interactive)
(insert (concat (scramble-string "@#$%&") "!") ))
;; (comic-book-insult) ; %@&$#!
;; (comic-book-insult) ; $%#@&!
--
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal