Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
Documentation
Instances
Functor (T x) Source # | \xs -> map (mapSnd ord) xs == Nodes.toList (fmap ord (Nodes.fromList (xs::[(Integer,Char)]))) |
Foldable (T x) Source # | \xs -> map snd xs == Fold.toList (Nodes.fromList (xs::[(Integer,Char)])) |
Defined in Numeric.Interpolation.NodeList fold :: Monoid m => T x m -> m # foldMap :: Monoid m => (a -> m) -> T x a -> m # foldMap' :: Monoid m => (a -> m) -> T x a -> m # foldr :: (a -> b -> b) -> b -> T x a -> b # foldr' :: (a -> b -> b) -> b -> T x a -> b # foldl :: (b -> a -> b) -> b -> T x a -> b # foldl' :: (b -> a -> b) -> b -> T x a -> b # foldr1 :: (a -> a -> a) -> T x a -> a # foldl1 :: (a -> a -> a) -> T x a -> a # elem :: Eq a => a -> T x a -> Bool # maximum :: Ord a => T x a -> a # | |
Traversable (T x) Source # | \x xs -> let f acc y = (acc+y,acc) in List.mapAccumL f x (map snd xs) == mapSnd Fold.toList (Trav.mapAccumL f x (Nodes.fromList (xs::[(Int,Integer)]))) |
(Eq x, Eq y) => Eq (T x y) Source # | |
(Ord x, Ord y) => Ord (T x y) Source # | |
(Show x, Show y) => Show (T x y) Source # | |
toList :: T x y -> [(x, y)] Source #
\xs -> xs == Nodes.toList (Nodes.fromList (xs::[(Integer,Char)]))
singleton :: x -> y -> T x y Source #
\x y -> Nodes.singleton x y == Nodes.fromList [(x,y)::(Integer,Char)]
lookup :: Ord x => T x y -> x -> (Maybe (x, y), Maybe (x, y)) Source #
>>>
Nodes.lookup (Nodes.fromList ([(0,'a'),(2::Int,'b')])) (-1)
(Nothing,Just (0,'a'))>>>
Nodes.lookup (Nodes.fromList ([(0,'a'),(2::Int,'b')])) 0
(Just (0,'a'),Just (2,'b'))>>>
Nodes.lookup (Nodes.fromList ([(0,'a'),(2::Int,'b')])) 1
(Just (0,'a'),Just (2,'b'))>>>
Nodes.lookup (Nodes.fromList ([(0,'a'),(2::Int,'b')])) 2
(Just (2,'b'),Nothing)>>>
Nodes.lookup (Nodes.fromList ([(0,'a'),(2::Int,'b')])) 3
(Just (2,'b'),Nothing)>>>
Nodes.lookup (Nodes.fromList ([(0,'a'),(2,'b'),(5::Int,'c')])) 3
(Just (2,'b'),Just (5,'c'))