Skip to content

phrase/2 may be useful to describe lists more compactly #1

@triska

Description

@triska

For example, instead of:

append(B1, B2, B12),
append(B3, B4, B34),
append(B12, B34, B1234),
append(B1234, B5, B12345),
append(B12345, [0], B),

you can use phrase/2 from library(dcgs) to write this as:

phrase((B1,B2,B3,B4,B5,[0]), Bs)

yielding the list Bs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions