norename class nlist{A} inherit list{A}

    head: A

    tail: list{A}

noncreation

    map{B}(f: fun1{A, B}): list{B} := nlist(f.apply1(head), tail.map(f))

    fold(g: fun2{A, A, A}, id: A): A := g(head, tail.fold(g, id))

    le(other: list{A}, el_le: fun2{A, A, bool}): bool :=
      other.nge(head, tail, el_le)

    private nge(ohead: A, otail: list{A}, el_le: fun2{A, A, bool}): bool
      := el_le(ohead, head) and otail.le(tail, el_le)

end
