move repl_fun examples into separate file, fix syntax in last example

now it fails with an unexpected type error...