Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with exercise - Lists + Return functions

Status
Not open for further replies.

artdias90

Programmer
Nov 24, 2009
1
BR
Using Lists and recursivity , make a function that generates a list with a string containing all binary numbers of N bits.

this examples is non-recursive:

ex3 :: [String]
ex3 = [[x,y,z,w]|x <-"01",y<-"01",z<-"01",w<-"01"]

 
You mean, with N = 2, L= [0, 1, 2, 3] (00, 01, 10, 11) ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top