Skip to content

Repository files navigation

java-pairs

Java CI Package

Functions for working with Pairs

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;

Usage examples

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)";

Hexlet Ltd. logo

This repository is created and maintained by the team and the community of Hexlet, an educational project. Read more about Hexlet.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

7 watching

Forks

Releases

Packages

Used by

Contributors

Languages