Skip to main content

Questions tagged [lisp]

This challenge is related to the Lisp family of languages. Note that challenges that require the answers to be in a specific language are generally discouraged.

Filter by
Sorted by
Tagged with
25 votes
5 answers
1k views

Ungolf my tinylisp code

I like golfing in tinylisp: (d M(q((x)(i x(i(disp x)0(M x))0 But I also like posting explanations with nicely formatted code: ...
DLosc's user avatar
  • 39.9k
9 votes
7 answers
769 views

Reverse cadaddadadaddddaddddddr [closed]

The Lisp language has a family of functions car, cdr, cadr, etc for accessing arrays. For ...
emanresu A's user avatar
20 votes
11 answers
4k views

I'm Lazy: Close my Superparens

Picolisp has a feature called "super parentheses": Brackets ('[' and ']') can be used as super parentheses. A closing bracket will match [all parentheses to and including] the innermost ...
Wezl's user avatar
  • 1,478
18 votes
20 answers
3k views

cadaddadadaddddaddddddr - linked list accessing

Create a function (or closest equivalent, or full program) that takes an list of some datatype (your choice) that may be nested and a string (in either order), and generalizes the lisp c[ad]+r ...
Wezl's user avatar
  • 1,478
1 vote
1 answer
302 views

Polyglot "Hello world" in Fortran and Lisp [duplicate]

Simple challenge: The code must be both valid Lisp and valid Fortran, and must print out "hello world" in both. Note: I've sunk about 5 hours into this at this point, I'm not even sure it's possible ...
CoffeeTableEspresso's user avatar
34 votes
2 answers
3k views

Generate Pyramid Scheme code

Pyramid Scheme is a language being developed by @ConorO'Brien. In Pyramid Scheme, the code that you write looks like this: ...
Pavel's user avatar
  • 9,377
9 votes
5 answers
380 views

Tips for golfing in tinylisp

tinylisp is, in its essence, a very stripped-down version of Lisp, as the name suggests. It was made by @DLosc for an "interpret this language" challenge, which can ...
clismique's user avatar
  • 6,980
47 votes
2 answers
2k views

McCarthy's LISP

McCarthy's 1959 LISP In early 1959, John McCarthy wrote a groundbreaking paper defining just nine primitive functions that when put together still form the basis for all LISP-like languages today. ...
habs's user avatar
  • 1,351
5 votes
2 answers
501 views

Tips for golfing in Common Lisp [duplicate]

What general tips do you have for golfing in Common Lisp? I'm looking for ideas which can be applied to code-golf problems and which are also at least somewhat specific to Common Lisp (e.g. "remove ...
MatthewRock's user avatar
12 votes
5 answers
1k views

Tips for golfing in Lisp

What general tips are these for golfing in Lisp (any dialect)? Please post one tip per answer, and only answers that are specific to a dialect of Lisp (e.g. "remove comments" is not an answer). ...
NoOneIsHere's user avatar
  • 2,201
19 votes
9 answers
904 views

Tips for golfing in Racket / Scheme

What general tips do you have for golfing in Racket / Scheme? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to Racket / Scheme (e.g. "...
cat's user avatar
  • 5,909
39 votes
3 answers
4k views

Tiny Lisp, tiny interpreter

Lisp programmers boast that Lisp is a powerful language which can be built up from a very small set of primitive operations. Let's put that idea into practice by golfing an interpreter for a dialect ...
DLosc's user avatar
  • 39.9k
19 votes
8 answers
1k views

Lisp Extraction Mission

In Lisp style languages, a list is usually defined like this: (list 1 2 3) For the purposes of this challenge, all lists will only contain positive integers or ...
absinthe's user avatar
  • 8,629
15 votes
4 answers
2k views

That's almost Lisp!

Challenge Your challenge is to design an interpreter for a lisp-like language, which will from hence forth be coined: GLisp. The program code for GLisp will consist of an arbitrary amount of nested ...
globby's user avatar
  • 1,190
18 votes
10 answers
1k views

Tips for golfing in Clojure

What are your tips for code golfing using Clojure? The aim of this question is to collect a list of techniques that are specific to Clojure and can be used in general code-golfing problems.
mikera's user avatar
  • 1,283