核心逻辑有限域与-ve值 [英] Core.logic finite domain with -ve values

查看:204
本文介绍了核心逻辑有限域与-ve值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道为什么当使用-5作为域值之一时下面的代码不返回任何结果

I am not sure why the below code doesn't return any result when using -5 as one of the domain value

user=> (run* [q] (infd q (domain -5 5)) (*fd q q 25))
()
user=> (run* [q] (infd q (domain 0 5)) (*fd q q 25))
(5)

$ b b

注意:此代码指的是core.logic 0.8.0 beta版中的行为。

NOTE: This code refers to behavior in the core.logic 0.8.0 betas.

推荐答案

目前没有支持core.logic 0.8.0 beta的域负值。如果它的工作,它完全是偶然的。我不打算亲自工作,在不久的将来增加支持,虽然一个全面的补丁将是受欢迎的0.8.0后得到正确的释放。

There is no support currently in the core.logic 0.8.0 betas for domains with negative values at all. If it works it's completely by accident. I don't intend on personally working to add support for this in the near future, though a comprehensive patch would be welcome after 0.8.0 gets a proper release.

这篇关于核心逻辑有限域与-ve值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆