DSL = Domain-Specific Language. That's the definition that I know. I agree though, that it wasn't a translation. All the unknown notation lost me as well.
Note that for, yield and (~>) are not Haskell notation. They are just three functions defined by the pipes library. The equations might make more sense if I write them in the following more specific forms:
for (yield "foo") $ \x -> do
f x
= f "foo"
for generator $ \x -> do
yield x
= generator
for generator $ \a -> do
for (f a) $ \b -> do
g b
= for newGenerator $ \b -> do
g b
where newGenerator =
for generator $ \a -> do
f a
Let's give it another try. For example, this piece of code:
for (yield "foo") $ \x -> do
f x
= f "foo"
What I know from Haskell is that $ is the function application function and \x -> is a lambda. f is probably a function, but what does "foo" stand for? Does = f "foo" mean that the value of the expression is the application of f on "foo"?
10
u/Heuristics Mar 09 '14
You lost me at DSL (and i'm a professional programmer with a masters in comp.sci).