708 transformations, notably reverse application and composition: |
708 transformations, notably reverse application and composition: |
709 |
709 |
710 x |> f f #> g |
710 x |> f f #> g |
711 (x, y) |-> f f #-> g |
711 (x, y) |-> f f #-> g |
712 |
712 |
|
713 * Pure/library.ML: introduced/changed precedence of infix operators: |
|
714 |
|
715 infix 1 |> |-> ||> ||>> |>> |>>> #> #->; |
|
716 infix 2 ?; |
|
717 infix 3 o oo ooo oooo; |
|
718 infix 4 ~~ upto downto; |
|
719 |
|
720 Maybe INCOMPATIBILITY when any of those is used in conjunction with other |
|
721 infix operators. |
|
722 |
713 * Pure/library.ML: natural list combinators fold, fold_rev, and |
723 * Pure/library.ML: natural list combinators fold, fold_rev, and |
714 fold_map support linear functional transformations and nesting. For |
724 fold_map support linear functional transformations and nesting. For |
715 example: |
725 example: |
716 |
726 |
717 fold f [x1, ..., xN] y = |
727 fold f [x1, ..., xN] y = |
734 the_default: 'a -> 'a option -> 'a |
744 the_default: 'a -> 'a option -> 'a |
735 the_list: 'a option -> 'a list |
745 the_list: 'a option -> 'a list |
736 |
746 |
737 * Pure/General: structure AList (cf. Pure/General/alist.ML) provides |
747 * Pure/General: structure AList (cf. Pure/General/alist.ML) provides |
738 basic operations for association lists, following natural argument |
748 basic operations for association lists, following natural argument |
739 order. The old functions may be expressed as follows: |
749 order; ; moreover the explicit equality predicate passed here avoids |
|
750 potentially expensive polymorphic runtime equality checks. |
|
751 The old functions may be expressed as follows: |
740 |
752 |
741 assoc = uncurry (AList.lookup (op =)) |
753 assoc = uncurry (AList.lookup (op =)) |
742 assocs = these oo AList.lookup (op =) |
754 assocs = these oo AList.lookup (op =) |
743 overwrite = uncurry (AList.update (op =)) o swap |
755 overwrite = uncurry (AList.update (op =)) o swap |
744 |
|
745 * Pure/General: structure AList (cf. Pure/General/alist.ML) provides |
|
746 basic operations for association lists, following natural argument |
|
747 order; moreover the explicit equality predicate passed here avoids |
|
748 potentially expensive polymorphic runtime equality checks. |
|
749 |
756 |
750 * Pure/General: structure OrdList (cf. Pure/General/ord_list.ML) |
757 * Pure/General: structure OrdList (cf. Pure/General/ord_list.ML) |
751 provides a reasonably efficient light-weight implementation of sets as |
758 provides a reasonably efficient light-weight implementation of sets as |
752 lists. |
759 lists. |
753 |
760 |