Your definition is entered into your history file, probably when you end
the session. On Linux, the file is ${HOME}/.julia_history - perhaps
someone else can report on OSX or Windows. This does not appear to be
mentioned in the main documentation.
On Monday, August 8, 2016 at 6:56:30 PM UTC-4, Naelson Douglas wrote:
>
> Is there a way for me to take a function I defined on REPL and then save
> it to a file?
>
> Example
> julia > double(x) = 2*x
> double (generic function with 1 method)
> julia > savetofile(double, "myfile.jl")
>
> After that I would open myfile.jl and see it's writher "double(x) = 2*x"
> there
>
>
>