k-legacy icon indicating copy to clipboard operation
k-legacy copied to clipboard

How to print out every key pair in a .Set?

Open csujedihy opened this issue 7 years ago • 3 comments

csujedihy avatar Apr 30 '17 20:04 csujedihy

Could you clarify what you're trying to do? .Set corresponds to the empty set in K, and there are no keys for a set.

ehildenb avatar May 02 '17 02:05 ehildenb

Sorry. I made a mistake here. I mean .Map.

Best regards,

Yi Huang

On 2017年5月1日 -0500 PM9:17, ehildenb [email protected], wrote:

Could you clarify what you're trying to do? .Set corresponds to the empty set in K, and there are no keys for a set. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

csujedihy avatar May 02 '17 05:05 csujedihy

.Map is the empty map, so it has no keys. If M is a variable of sort Map you can call keys(M) to get the Set of keys of the map.

ehildenb avatar May 02 '17 14:05 ehildenb