3 added 142 characters in body

f u=filter(elemu)[minimum u[(minBound::Int)..maximum u]]


LoopLoops through all integers x from the minimum to the maximum of the input list(signed 64bit, on my machine) and keeps those that are in u and keep. Of course it if it'sdoesn't finish in reasonable time.

The previous version looped through [minimum u..maximum u] which has the same worst case running time.

Edit: @xnor saved a byte. Thanks!

f u=filter(elemu)[minimum u..maximum u]


Loop through all integers x from the minimum to the maximum of the input list u and keep it if it's in u.

Edit: @xnor saved a byte. Thanks!

f u=filter(elemu)[(minBound::Int)..]


Loops through all integers (signed 64bit, on my machine) and keeps those that are in u. Of course it doesn't finish in reasonable time.

The previous version looped through [minimum u..maximum u] which has the same worst case running time.

Edit: @xnor saved a byte. Thanks!

2 added 46 characters in body

f u=[x|x<-u=filter(elemu)[minimum u..maximum u],elem x u]


Loop through all integers x from the minimum to the maximum of the input list u and keep it if it's in u.

Edit: @xnor saved a byte. Thanks!

f u=[x|x<-[minimum u..maximum u],elem x u]


Loop through all integers x from the minimum to the maximum of the input list u and keep it if it's in u.

f u=filter(elemu)[minimum u..maximum u]


Loop through all integers x from the minimum to the maximum of the input list u and keep it if it's in u.

Edit: @xnor saved a byte. Thanks!

1

f u=[x|x<-[minimum u..maximum u],elem x u]

Loop through all integers x from the minimum to the maximum of the input list u and keep it if it's in u.