freeone3000
public text v1 · immutableindexof :: [Char]->Char->Integer -> Integer
indexof [] _ _ = -1
indexof (x:xs) c i | x == c = i
| x < c = indexof xs c i+1
| x > c = indexof xs c i+1
main = putStr(indexof("foo" 'o' 0))