I am trying to create code that takes an integer 'a' and a list and returns a list of every value in the list that is less than a. I have created code that will figure out if the first number in the list is less than 'a' but I can't quite figure out the recursion. Any help would be great!
fun smallethan(a,[]) = [] | smallerthan(a,list) = if hd(list) < a then [hd(list)];