day10
This commit is contained in:
parent
b0b6df2d40
commit
66e6052e5e
13 changed files with 102 additions and 36 deletions
5
day6.m
5
day6.m
|
@ -1,9 +1,8 @@
|
|||
:- module day6.
|
||||
:- interface.
|
||||
:- import_module basics.
|
||||
:- import_module univ.
|
||||
|
||||
:- pred run(part::in, lines::in, univ::out) is cc_multi.
|
||||
:- pred run(part::in, lines::in, answer::out) is cc_multi.
|
||||
|
||||
:- implementation.
|
||||
:- import_module int.
|
||||
|
@ -26,7 +25,7 @@ length(one) = 4.
|
|||
length(two) = 14.
|
||||
|
||||
:- pragma no_determinism_warning(run/3).
|
||||
run(Part, Lines, univ(Out)) :-
|
||||
run(Part, Lines, int(Out)) :-
|
||||
if Lines = [Line] then
|
||||
Len = length(Part),
|
||||
(if start_index(Len, to_char_list(Line), Out0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue