[Haskell-beginners] Help in Haskell
Andre Paulo Machado
andre.panm at gmail.com
Mon Nov 24 02:04:12 EST 2008
Hi folks..... Somebody could help me, please?
Please, I would like a help in haskell programming, because I have with
following question:
I need to create a list of strings, like as a graph.
See:
initiaList = [ ("BSB,"SSA"),
("CNF","SSA"),
("CNF","GIG"),
("CNF","GRU"),
("GIG","CNF"),
("GIG","GRU"),
("GRU","BSB"),
("GRU","GIG"),
("GRU","CNF"),
("SSA","CNF") ]
With this list above, I will create a function that returns a path with max
number of links:
example:
maxLink = 4 (result until 4)
command: myFunction "BSB" "GRU" 4
result: 1st Option: BSB -> SSA -> CNF -> GRU
2nd Option: BSB -> SSA -> CNF -> GIG -> GRU
----------------------------------------------------------------------------
command: myFunction "BSB" "GRU" 3
result: 1st Option: BSB -> SSA -> CNF -> GRU
----------------------------------------------------------------------------
How do this?
I'm waiting from you,
thank you so much.
Andre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/beginners/attachments/20081124/5af12ad8/attachment.htm
More information about the Beginners
mailing list