Skip to content

Re-implement add_n/3 #27

@mlliarm

Description

@mlliarm

% add_n/3, adds a number and an interval.

I think that maybe it'd be better to use add/3 adding the intervals i(N,N) and i(Xa,Xb) instead of rewriting the logic inside add_n/3.

How it could go like:

add_n(N, i(Xa, Xb), Sum) :- 
    add(i(N, N), i(Xa, Xb), Sum).

What do you think @pmoura ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions