Autor
|
Tema: SortedLinearSet en Haskell (Leído 1,862 veces)
|
lRetro
Desconectado
Mensajes: 4
|
empty :: Set a empty = Empty
isEmpty :: Set a -> Bool isEmpty Empty = True
insert :: (Ord a) => a -> Set a -> Set a insert x Empty = Node x Empty insert x (Node y s) | x < y = Node x (Node y s) | x == y = Node y s | otherwise = Node y (insert x s)
-- checks if an element is in set or not isElem :: (Ord a) => a -> Set a -> Bool isElem = undefined
-- removes an element from a set delete :: (Ord a) => a -> Set a -> Set a delete = undefined
Me falta el isElem y delete, que no consigo verlo. Gracias.
|
|
|
En línea
|
|
|
|
|
Mensajes similares |
|
Asunto |
Iniciado por |
Respuestas |
Vistas |
Último mensaje |
|
|
haskell
Programación General
|
mapers
|
4
|
7,124
|
25 Marzo 2011, 18:33 pm
por Tryptophan
|
|
|
[Haskell]Aprende Haskell por el bien de todos en PDF
Scripting
|
avesudra
|
2
|
12,897
|
3 Marzo 2013, 01:39 am
por benetheory
|
|
|
haskell
Programación General
|
_niu
|
7
|
3,690
|
9 Diciembre 2012, 22:42 pm
por criskapunk
|
|
|
Duda con Haskell
Programación General
|
maritere22
|
2
|
2,324
|
22 Diciembre 2013, 23:58 pm
por maritere22
|
|
|
Haskell
Programación General
|
csp
|
2
|
2,417
|
21 Septiembre 2014, 18:25 pm
por csp
|
|