import static io.hexlet.pairs.Pair.car;
import static io.hexlet.pairs.Pair.cdr;
import static io.hexlet.pairs.Pair.cons;
import static io.hexlet.pairs.Pair.pairToString;
import static io.hexlet.pairs.Pair.isPair;
var pair = cons(1, 2);
var one = car(pair); // one = 1;
var two = cdr(pair); // two = 2;
var isPair = isPair(pair); // isPair == true;
var result = pairToString(pair); // pair = "(1, 2)";
This repository is created and maintained by the team and the community of Hexlet, an educational project. Read more about Hexlet.
See most active contributors on hexlet-friends.