>>373
haskell

ofoff x = case x of
_ | x == "" -> [ ]
_ | x == "OF" -> [ "OF" ]
_ | x !! 2 == 'F' -> "OFF" : ( ofoff $ drop 3 x )
_ -> "OF" : ( ofoff $ drop 2 x )

main = print $ ofoff "OFOFOFFOFOFFOFOFF"
---
["OF","OF","OFF","OF","OFF","OF","OFF"]