Skip to content

Instantly share code, notes, and snippets.

@lcs-felix
Last active August 22, 2020 15:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lcs-felix/3b22909bcc104932d0b79fa889019ec4 to your computer and use it in GitHub Desktop.
Save lcs-felix/3b22909bcc104932d0b79fa889019ec4 to your computer and use it in GitHub Desktop.
public class Main {
static class Node {
final Object car;
final Node cdr = this;
Node(Object content) {
this.car = content;
}
}
public static void main(String[] args) {
System.out.println(new Node("arquiteto").cdr.cdr.cdr.cdr.cdr.car); // arquiteto
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment