Jump to content

Fork: Difference between revisions

Add LFE version of fork based on the Erlang version
(Nimrod -> Nim)
(Add LFE version of fork based on the Erlang version)
Line 576:
Aha, I am still in the original thread
</pre>
 
=={{header|LFE}}==
<lang lisp>
;;;
;;; This is a straight port from the Erlang version.
;;;
;;; You can run this in the LFE REPL by slurping the file:
;;;
;;; > (slurp "fork.lfe")
;;; > (start)
;;;
(defmodule fork
(export (start 0)))
 
(defun start ()
(spawn (lambda () (child))))
 
(defun child ()
(lfe_io:format "This is the new process~n" '()))
</lang>
 
=={{header|Lua}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.