Solutions to the N-Queens Problem
MCPL implementation, published by Martin Richards:
GET "mcpl.h"
STATIC count, all
FUN try
: ?, =all, ? => count++
$ HOMEBREW_MAKE_JOBS=1 brew install -v numpy 2>&1 | |
Error: value must be enumerable | |
Please report this bug: | |
https://github.com/Homebrew/homebrew/wiki/troubleshooting | |
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/set.rb:281:in `|' | |
/usr/local/Library/Homebrew/options.rb:87:in `|' | |
/usr/local/Library/Homebrew/formula_installer.rb:320:in `effective_build_options_for' | |
/usr/local/Library/Homebrew/formula_installer.rb:296:in `expand_dependencies' | |
/usr/local/Library/Homebrew/dependency.rb:102:in `action' | |
/usr/local/Library/Homebrew/dependency.rb:100:in `catch' |
-module(morelists). | |
-export([concat/1, concat_test/0, insertion_sort/1, | |
join/2, join_test/0, member/2, member_test/0, | |
merge_sort/1, perms/1, perms_test/0, quicksort/1, | |
sort_tests/0, test/0]). | |
join([], Y) -> Y; | |
join([X | Xs], Y) -> [X | join(Xs, Y)]. |
-module(text). | |
-export([get_file_contents/1, process/2, process/3, | |
show_file_contents/1, test/0]). | |
% Used to read a file into a list of lines. | |
% Example files available in: | |
% gettysburg-address.txt (short) | |
% dickens-christmas.txt (long) |
-module(billing). | |
% use print_bill/1 for the defualt items/1 list, or supply your | |
% own using print_bill/2 and the remove_item/1 and | |
% upate_item/1 APIs | |
-export([items/0, print_bill/1, print_bill/2, | |
remove_item/2, test/0, update_item/2]). | |
items() -> | |
[{4719, "Fish Fingers", 121}, {5643, "Nappies", 1010}, |
-module(hof). | |
-export([doubleAll/1, evens/1, product/1, test/0]). | |
doubleAll(Xs) -> lists:map(fun (X) -> 2 * X end, Xs). | |
doubleAll_test() -> | |
[] = doubleAll([]), | |
[2] = doubleAll([1]), | |
[0, 6] = doubleAll([0, 3]), |
-module(hof2). | |
-export([composition/1, iteration/1, test/0, twice/2]). | |
composition(Fs) -> | |
fun (X) -> lists:foldr(fun (F, Y) -> F(Y) end, X, Fs) | |
end. | |
composition_test() -> | |
F = composition([fun (X) -> X * 2 end, |
-module(rps). | |
-export([const/1, cycle/1, echo/1, enum/1, | |
hindsight_strat/1, least_freq/1, most_freq/1, | |
no_repeat/1, play/1, play_two/3, rand/1, rand_strat/1, | |
rock/1, test/0, tournament/2, val/1]). | |
% | |
% play one strategy against another, for N moves. | |
% |
I hereby claim:
To claim this, I am signing this object: