Check if list is Flattened or not in Prolog

前端 未结 0 1662
执笔经年
执笔经年 2020-12-17 03:15

Given a list, I want to check whether the given list is flat or not using prolog.

Example:-

1. ?- is_flat([1,2,3]) should return true

2. ?- is_flat([1,f,2,r         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题