Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Haskell Questions

Name: Anonymous 2008-12-03 12:06

Sup dudes, a couple of Haskell questions:

- what is the meaning of "deriving Eq", in the end of a data type definition?

- is there any native Haskell function that giving String A, String B and Int C, to check if A is only made of B and only C times. "Ron" "RonRon" 2 -> True
I could swear I saw something like that in a substring shit

Name: Anonymous 2008-12-04 9:29

I'm apparently a colleague and he got the question wrong.

The function needed for that stuff is actually this:

test :: String -> String -> Int -> Bool
"String A, String B and Int C, to check if A is only made of B  (!! this B comes from a [String] inside the main program, so it's only True if there's B, but not the reast!!) and B only exists C times."

Yes, but you must test the other Strings.

A = "lolwrong"
B = "lol" , with ["lol","wut","moar"]
C = 1
True

if A was "lolwut", it would be False

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List