on master help sign in
Applicative instance for List.
1c096fcstartling
lib/Prelude.idr+5
@@ -128,6 +128,11 @@ instance Applicative (Either e) where
128 (Right f) <$> (Right r) = Right (f r)
128 (Right f) <$> (Right r) = Right (f r)
129 (Right _) <$> (Left l) = Left l
129 (Right _) <$> (Left l) = Left l
130
130
131+instance Applicative List where
132+ pure x = [x]
133+
134+ fs <$> vs = concatMap (\f => map f vs) fs
135+
131---- some mathematical operations
136---- some mathematical operations
132
137
133%include "math.h"
138%include "math.h"