Fork: Difference between revisions

Content added Content deleted
(Added Elixir)
m (→‎{{header|LFE}}: Tweaked for LFE)
Line 641: Line 641:


=={{header|LFE}}==
=={{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)))


{{trans|Erlang}}

You can run this in the REPL as-is:

<lang lisp>
(defun start ()
(defun start ()
(spawn (lambda () (child))))
(spawn (lambda () (child))))