You pass a state and return a new, modified state. You can, however, "pass" many other things in functional programming - see monads (also called computation expressions). I recommend fsharpforfunandprofit website for gentle introduction into FP (and a language called F# which is basically OCaml) and what it can do (especially in parsers area)