i want to implement a function in list comprehension. It should deletes the integers in a list of numbers.
And i have a question about it.
delete xs = [ys|ys<-xs, ys /=fromInteger (round ys) ]
xxx.hs> delete [1,2,3.0,4.5,6.7]
[4.5,6.7]
is that means 3.0 is counted as integer instead of float?
And another question:
delete xs = [ys|ys<-xs, ys ==fromInteger (round ys) ]
this time i want it to return integers from a list of numbers.
xxx.hs> delete [1,2,3.0,4.5,6.7]
[1.0,2.0,3.0]
since i did not give the number 1 and 2 in decimal form, why it returns the numbers in decimal?
Thanks for helping me.