在序言中插入列表 [英] Inserting in an list in prolog

查看:105
本文介绍了在序言中插入列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用户能够使用Visual Prolog 5.2控制台应用程序在序言I''中插入列表元素.

How to make user be able to insert list''s element in prologe I''m using Visual Prolog 5.2 Console Application.

推荐答案

根据文档:
As per the documentation:
1.21 (*) Insert an element at a given position into a list.
    Example:
    ?- insert_at(alfa,[a,b,c,d],2,L).
    L = [a,alfa,b,c,d]


此处的详细信息:序言列表 [序言列表&如何操作列表 [ ^ ]


Details here: Prolog Lists[^]
More: Prolog list & How to manipulate list[^]


这篇关于在序言中插入列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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