1
1
mirror of https://github.com/thma/LtuPatternFactory.git synced 2025-01-06 03:23:19 +03:00

continue interpreter section

This commit is contained in:
thma 2018-12-29 17:04:55 +01:00
parent 0f3d6f1dbe
commit 704eeeaf0b
3 changed files with 9 additions and 0 deletions

View File

@ -29,6 +29,7 @@ executable LtuPatternFactory
, Visitor
, Coerce
, IdiomBrackets
, Interpreter
, DependencyInjection
, CheapskateRenderer
, CMarkGFMRenderer
@ -63,6 +64,7 @@ test-suite LtuPatternFactory-Demo
, Visitor
, Coerce
, IdiomBrackets
, Interpreter
, DependencyInjection
, CheapskateRenderer
, CMarkGFMRenderer

View File

@ -785,6 +785,11 @@ eval (Let x e1 e2) = eval e1 >>= \v -> local ((x,v):) (eval e2)
[to be continued]
This section was inspired by ideas presented in [Quick Interpreters with the Reader Monad](https://donsbot.wordpress.com/2006/12/11/quick-interpreters-with-the-reader-monad/).
[Sourcecode for this section](https://github.com/thma/LtuPatternFactory/blob/master/src/Interpreter.hs)
### Composite → SemiGroup → Monoid
>In software engineering, the composite pattern is a partitioning design pattern. The composite pattern describes a group of objects that is treated the same way as a single instance of the same type of object. The intent of a composite is to "compose" objects into tree structures to represent part-whole hierarchies. Implementing the composite pattern lets clients treat individual objects and compositions uniformly.

View File

@ -13,6 +13,7 @@ import Singleton
import Strategy
import TemplateMethod
import Visitor
import Interpreter
main :: IO ()
main = do
@ -30,3 +31,4 @@ main = do
abstractFactoryDemo
jsonPersistenceDemo
demoDI
interpreterDemo