List of Atom or List of List
  Home FAQ Contact Sign in
 
Advanced search
MATCHING GROUPS



more...
POPULAR GROUPS

more...

found 6750 articles for 0.079 sec
Re: List of Atom or List of List??     

Group: comp.lang.functional · Group Profile · Search for List of Atom or List of List in comp.lang.functional
Author: Steve Schafer
Date: Apr 9, 2007 06:49

... 12:36:12 -0700, kheirandish.amin@gmail.com wrote: nil is my own datatype . atoms : 1::Int 'a'::Char Haskell is strongly typed, so as Lauri suggests, the problem you'...in fact, you have to jump through a couple of hoops just to create a function that will accept both lists of "atoms" and lists of lists. So, I think we need to see a more complete example of how you would use the function ...
Show full article (0.61Kb)
Re: List of Atom or List of List??     

Group: comp.lang.functional · Group Profile · Search for List of Atom or List of List in comp.lang.functional
Author: Lauri Alanko
Date: Apr 8, 2007 11:43

... occurrences of the first given atom, p1, replaced by the second ... be deleted and the returned list cannot contain anything in place ...give any indication about what "atoms" or "nil" are. Those are...nil" typically means the empty list, but the assignment seems to...material) doesn't specify what atoms and nil are? Are you...datatype that includes both atomic and list-like values? Finally, are...
Show full article (1.18Kb)
Re: List of Atom or List of List??     

Group: comp.lang.functional · Group Profile · Search for List of Atom or List of List in comp.lang.functional
Author: Lauri Alanko
Date: Apr 8, 2007 10:41

....amin@gmail.com> wrote: how can detect some element of list is list o Atom?? What is an atom? That is term is not commonly used with ... fails to type-check. Haskell's lists are homogeneous, i.e. all the ...same type. So either _all_ elements are lists (in which case the list...them are (in which case the list has type [b] for some type b which is not a list type). In any case, there is...
Show full article (0.84Kb) · Show article thread
Re: List of Atom or List of List??     

Group: comp.lang.functional · Group Profile · Search for List of Atom or List of List in comp.lang.functional
Author: Steve Schafer
Date: Apr 8, 2007 07:00

On 8 Apr 2007 02:46:25 -0700, kheirandish.amin@gmail.com wrote: how can detect some element of list is list o Atom?? (list? 42) --> #f (list? '(42 37)) --> #t Steve Schafer Fenestra Technologies Corp. http://www.fenestra.com/
Show full article (0.24Kb) · Show article thread
Re: List of Atom or List of List??     

Group: comp.lang.functional · Group Profile · Search for List of Atom or List of List in comp.lang.functional
Author: kheirandish.amin
Date: Apr 8, 2007 04:53

i want to replace on Atom by another in list..for example: replace 1 2 [1,2] => [2,2] but sometime i have replace 1 2 [[1,2],2]=>[[2,2],2] i want to detect if first element of list is list then recurcively call head on that element.. is there any solutions??
Show full article (0.26Kb)
List of Atom or List of List??     

Group: comp.lang.functional · Group Profile · Search for List of Atom or List of List in comp.lang.functional
Author: kheirandish.amin
Date: Apr 8, 2007 02:46

how can detect some element of list is list o Atom?? for example when i try head (head p1) where p1=[[1,2],2] return 1 but when try head (head p1) where p1=[1,2] it returns Error
Show full article (0.18Kb)
Re: List of Atom or List of List??     

Group: comp.lang.functional · Group Profile · Search for List of Atom or List of List in comp.lang.functional
Author: Mark T.B. Carroll
Date: Apr 9, 2007 16:11

...stuff which, while not using exceptions, shows some stuff where in other languages you might use exceptions. for example a function that take an Integer as argument.but we call it by pass a list as argument and then programm detect it and print something... Er, such a programme wouldn't compile anyway. That's what static typechecking is all about. Or are you trying to do something ...
Show full article (0.98Kb)
Re: List of Atom or List of List??     

Group: comp.lang.functional · Group Profile · Search for List of Atom or List of List in comp.lang.functional
Author: Albert Y. C. Lai
Date: Apr 9, 2007 15:42

... wrote: for example a function that take an Integer as argument.but we call it by pass a list as argument and then programm detect it and print something... Correction: a function that take an Integer as argument.but we call it by pass a list as argument and then compiler detect it and print something... Solution: You don't need to do anything. ...
Show full article (0.42Kb)
Re: List of Atom or List of List??     

Group: comp.lang.functional · Group Profile · Search for List of Atom or List of List in comp.lang.functional
Author: kheirandish.amin
Date: Apr 9, 2007 14:01

how can i use exception handling in haskell?? is there any sample code?? for example a function that take an Integer as argument.but we call it by pass a list as argument and then programm detect it and print something... Thanks...
Show full article (0.23Kb)
Re: List of Atom or List of List??     

Group: comp.lang.functional · Group Profile · Search for List of Atom or List of List in comp.lang.functional
Author: Mark T.B. Carroll
Date: Apr 9, 2007 05:05

kheirandish.amin@gmail.com writes: (snip) NO MATTER HOW DEEP IT OCCURRED IN THE LIST. Are you sure they don't just mean, no matter how late it occurs in the list? That is, the 'depth' is how far 'along' the list it is, rather than to what degree it's wrapped up in sublists? -- Mark
Show full article (0.29Kb)
1 · 2 · 3 · 4 · 5 · 6 · 7 · 8 · 9 · next