> SML experts, how do you make this function?

SML experts, how do you make this function?

Posted at: 2014-12-18 
(a) Write a function all_except_option, which takes a string and a string list

. Return NONE if the string is not in the list, else return SOME lst where lst

is identical to the argument list except the string is not in it. You may assume the string is in the list at most once. Use

same_string, provided to you, to compare strings. Sample solution is around 8 lines.

P.S. you can only use pattern matching for this. You can't use hd, tl, null, val0f, isSome, or anything containing a # character.