Skip to content

Instantly share code, notes, and snippets.

@danielphan2003
Last active August 7, 2022 23:58
Show Gist options
  • Save danielphan2003/ed5ae253ab8bb20288c40246cb490d55 to your computer and use it in GitHub Desktop.
Save danielphan2003/ed5ae253ab8bb20288c40246cb490d55 to your computer and use it in GitHub Desktop.

How about:

(defvar concatOnce
	(defthunk [x y] "${x} ${y}"))

(defvar joinAll
	(defthunk [list ?at ?delim]
		"${list[${
			if at == "" then 0 else at
		}]}${delim}${
			joinAll
				:list list
				:at {at + 1)
				:delim delim}"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment