Skip to content

evectant/hacs-problems

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HACS Problems

A collection of problems with solutions for everyone interested in HACS, but perhaps most useful to those taking the compilers class at NYU.

Installation

Make sure you have HACS installed, then clone the repository:

$ git clone https://github.com/evectant/hacs-problems.git

Usage

Use check problems to find the next unsolved problem in the recommended order:

$ ./check problems
Checking lists/IsEmpty.hx
  Failing tests
  ./check lists/IsEmpty.hx

Use check <problem> to see the failing tests:

$ ./check lists/IsEmpty.hx
Compiling lists/IsEmpty.hx
Running tests from lists/IsEmptyTest.csv
Test 1 failed
  ./lists/IsEmpty.run --scheme=IsEmpty --term=''
  Expect: True
  Actual: 
...
Passed 0/3 tests

Work on the problem until it passes the tests:

$ edit lists/IsEmpty.hx
$ ./check lists/IsEmpty.hx 
Compiling lists/IsEmpty.hx
Running tests from lists/IsEmptyTest.csv
Test 1 passed
  ./lists/IsEmpty.run --scheme=IsEmpty --term=''
  Expect: True
  Actual: True
...
Passed 3/3 tests

Compare with the reference solution:

$ view lists/IsEmptySolution.hx

Proceed to the next unsolved problem:

$ ./check problems
Checking lists/IsEmpty.hx
Checking lists/HeadTail.hx
  Failing tests
  ./check lists/HeadTail.hx

You can also use check list to list all the problems and work on them in any order.

See check help for more options.

About

A collection of HACS problems with solutions

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published