
(provide (quote tools))

(defun flatten (lst) (byte-code "	ฤ??/ @ล! ฦ
C\"% ฦ
ว!\")A 
*" [left lst out first nil atom append flatten] 7))

(provide (quote split))

(defun split (string &optional regexp sep) "\
Splits STRING into a list of strings by choosing breakpoints 
according to REGEXP.  If REGEXP does not occur the entire STRING
is contained in the first element of the returned list.  REGEXP is
optional and defaults to [ \\t]+ (whitespace).  Optional third arg
SEPARATORS causes the text that matches grouped expressions in REGEXP
at each breakpoint to be included in the returned list.  WARNING: This
function can loop endlessly if REGEXP matches the null string." (byte-code " ม สหฬ!อรCฮ!
qceb`ฯมว#c ะัาำ!\"C\"Aิ 	L Z ะC\"A`& )ะั`d\"C\"AA*)))" [regexp nil buf split-list split-tail string p t mtext sep "[ 	]+" generate-new-buffer "  *tmp" ((byte-code "ม!" [buf kill-buffer] 2)) last re-search-forward setcdr buffer-substring match-beginning 0 matched-strings] 13))

(defun matched-strings-list nil "\
Returns a list that contains each grouped subexpression matched in
the previous regular-expression search." (interactive) (byte-code "รฤล !มCฦ	!1 @' ว
ศ@ษ!\"C\"
Aฤ! 	A+" [data mlist mtail nil cddr match-data last setcdr buffer-substring cadr] 10))

(defun matched-strings nil "\
Returns a single string that is the concatenation of all the parenthesized
expressions in the previous regular-expression search." (interactive) (byte-code "ภมยร \"" [nil apply concat matched-strings-list] 4))

(defun cddr (c) "\
Returns (cdr (cdr x))." (byte-code "AA" [c] 1))

(defun last (lst) "\
Return the pointer to last element of LIST or nil is LIST is nil.
(setcdr (last l) (cons NEW-ELEMENT nil)) appends NEW-ELEMENT to the 
end of l via mutation." (byte-code "มGS\"" [lst nthcdr] 3))
