Skip to content

Uppercasing a string with maplist/3 and char_type/2 #2129

Closed Answered by UWN
razetime asked this question in Q&A
Discussion options

You must be logged in to vote

There are a couple of problems, none of which is related to maplist/3 or lambda.

?- char_type(a,to_upper(A)), char_type(b,to_upper(B)).
   B = "B",  unexpected.

This is unexpected for a couple of reasons. First, there is no answer substitution for A. This is clearly an internal bug somewhere in Scryer.

But then, the answer substitution itself is odd, it should be exactly the other way around, at least in SWI which itself has a problem SWI-Prolog/issues#130.

Also, I do not understand the point of producing here a string. The documentation mentions this, but no, I do not get it.

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
6 replies
@UWN
Comment options

@razetime
Comment options

@aarroyoc
Comment options

@triska
Comment options

@triska
Comment options

Answer selected by razetime
Comment options

You must be logged in to vote
2 replies
@UWN
Comment options

@aarroyoc
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants