Last active
August 22, 2020 15:45
-
-
Save lcs-felix/3b22909bcc104932d0b79fa889019ec4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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