Plan 9 from Bell Labs’s /usr/web/sources/contrib/fernan/nhc98/tests/nofib/real/anna/pairid.cor

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.



pair a b ::= Pair a b;

list a ::= Nil | Cons a (list a);

;;

pairid p = case p of Pair a b -> Pair a b end;

lid a = case a of Nil -> Nil; Cons x xs -> Cons x xs end;

magic p = case p of Pair as bs -> Pair (lid as) (lid bs) end;

baad p = pairid (magic p);

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.