on master help sign in
Make (++) right associative

Since (++) recurses on its left argument, (l ++ c) ++ r traverses l twice, while l ++ (c ++ r) only once. Furthermore, making (++) the same precedence as (::) enables the two to be mixed.

commitb8ef4f4a8c9783b1ef95b7c98960ea03c4eea939 authorMelvar Chen <Melvar.Chen@googlemail.com> dateThu 13 Feb 2014, 17:06 (13 years ago) parent57af985
1 file changed+1−2
libs/prelude/Prelude/List.idr+1−2
libs/prelude/Prelude/List.idr+1−2
@@ -12,8 +12,7 @@ import Prelude.Nat
1212%access public
1313%default total
1414
15−infixr 7 ::
16−infixl 8 ++
15+infixr 7 ::,++
1716
1817%elim data List a
1918 = Nil