
27 Feb
2015
27 Feb
'15
3:51 p.m.
Hi. An elementary question here about two functions in Data.List: how to use a value from findIndex which returns a Maybe Int, and then use that result in splitAt which takes a regular Int? This is in an IO() do Like so: (This is in an IO() do block) let gradeItemIndex = findIndex (\g -> (itemName g) == (itemName gradeItemP)) gradeItemList let twoListsTuple = splitAt gradeItemIndex gradeItemList // does not compile obviously Many Thanks, Geoffrey