MapFromIntegerToString.java
package com.acme.maps;

import church.lang.ByteStream;
import church.lang.Hash.$HashCode;
import church.lang.operators.Relational.$$equal;
import church.lang.operators.Streams.$$encode;
import church.primitives.Integers;
import church.primitives.Objects;
import church.util.HashMap;
import church.util.HashMap.$Map;
import church.util.HashMap.$OutEntry;

import static church.lang.operators.Streams.output;
import static church.util.Entry.entry;
import static church.util.HashMap.get;

@SuppressWarnings("unchecked")
public class MapFromIntegerToString {
    private static final $$equal<Integer>                               $S0 = Integers::$equal;
    private static final $HashCode<Integer>                             $S1 = Integers::hashCode;
    private static final $Map<Integer, String>                          $S2 = HashMap.map($S0, $S1);
    private static final $$encode<ByteStream, String>                   $S3 = Objects::$encode;
    private static final $$encode<ByteStream, Integer>                  $S4 = Integers::$encode;
    private static final $OutEntry<ByteStream, Integer, String>         $S5 = HashMap.outEntry($S3, $S3, $S4);
    private static final $$encode<ByteStream, HashMap<Integer, String>> $S6 = HashMap.$encode($S5);
    private static final $$equal<String>                                $S7 = Objects::$equal;

    public static void main(String[] args) {
        HashMap<Integer, String> a = $S2.map(entry(1, "hello"), entry(3, "world"));
        $S3.$encode($S6.$encode($S3.$encode(output, "a = "), a), "\n");
        String e1 = get(a, 1);
        $S3.$encode($S3.$encode($S3.$encode(output, "a.get(1) = "), e1), "\n");
        String e2 = get(a, 1);
        $S3.$encode($S3.$encode($S3.$encode(output, "a[1] = "), e2), "\n");
        assert $S7.$equal(get(a, 1), "hello");
    }

}