# Pastebin iqGbQi4Y
OLX-RJ233-WLAN:ProblemSolver fernando$ perl6 -I. -MProblem -e 'my $p = Problem.new; $p.add-variable: "A", ^10; $p.add-variable: "B", ^10; $p.constraint-vars: &infix:, ; $p.add-constraint: -> :$A!, :$B! {$A + $B == 10}; say $p.solve'
({A => 3, B => 7} {A => 1, B => 9} {A => 6, B => 4} {A => 2, B => 8} {A => 7, B => 3} {A => 9, B => 1} {A => 4, B => 6} {A => 8, B => 2})
OLX-RJ233-WLAN:ProblemSolver fernando$ git checkout -
Switched to branch 'error'
OLX-RJ233-WLAN:ProblemSolver fernando$ rm -rf .precomp/
OLX-RJ233-WLAN:ProblemSolver fernando$ perl6 -I. -MProblem -e 'my $p = Problem.new; $p.add-variable: "A", ^10; $p.add-variable: "B", ^10; $p.constraint-vars: &infix:, ; $p.add-constraint: -> :$A!, :$B! {$A + $B == 10}; say $p.solve'
Type check failed in assignment to %!heuristics; expected Array[Callable] but got Array[Callable].new()
in method add-heuristic at /Users/fernando/ProblemSolver/Problem.pm6 (Problem) line 11
in method constraint-vars at /Users/fernando/ProblemSolver/Problem.pm6 (Problem) line 75
in block at -e line 1