mirror of
https://github.com/vale981/lack
synced 2025-03-05 17:31:39 -05:00
19 lines
447 B
Common Lisp
19 lines
447 B
Common Lisp
(in-package :cl-user)
|
|
(defpackage lack.component
|
|
(:use :cl)
|
|
(:export :lack-component
|
|
:call
|
|
:to-app))
|
|
(in-package :lack.component)
|
|
|
|
(defclass lack-component () ())
|
|
|
|
(defgeneric call (component env)
|
|
(:method ((component function) env)
|
|
(funcall component env)))
|
|
|
|
(defgeneric to-app (component)
|
|
(:method ((component lack-component))
|
|
(lambda (env) (call component env)))
|
|
(:method ((component t))
|
|
component))
|