Skip to content

Upgrade random-int to be compatible with HE #259

@ngeiswei

Description

@ngeiswei

What is your problem?

random-int is no longer compatible with the HE version, it needs to support random generators. See https://github.com/trueagi-io/hyperon-experimental/blob/8463e00c6a64fdddd485278bc2ad33fde27451cd/lib/src/metta/runner/stdlib/stdlib.metta#L206-L239

How to reproduce your problem?

Run the following code in MeTTaLog

!(random-int (new-random-generator 0) 0 2)

What do you get?

[(random-int (new-random-generator 0) 0 2)]

What should normally expect?

A random number within [1, 2).

Metadata

Metadata

Assignees

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions