Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Haskell: how to filter the result after the call to exec, so that you get a new environment that only contains output-variable-pairs This is

In Haskell: how to filter the result after the call to exec, so that you get a new environment that only contains output-variable-pairs

This is the BIPLE constructor: data BIPLE = BIPLE [String] [String] [Stmt] -- first tuple is input, second tuple is output

This is the function:

execBIPLE :: BIPLE -> Environment -> Environment execBIPLE (n1 n2 s) env = case checkInput i env True -> (exec n1 env) False -> error $ "unknown_variable_" -- this is the one I struggle with: -- execBIPLE (_ n2 _) env = filter (`elem` exec n1) env ???

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions