Skip to Content.
Sympa Menu

k-user - Re: [K-user] (no subject)

k-user AT lists.cs.illinois.edu

Subject: K-user mailing list

List archive

Re: [K-user] (no subject)


Chronological Thread 
  • From: Ömer Sinan Ağacan <omeragacan AT gmail.com>
  • To: Chris Hathhorn <chathhorn AT gmail.com>
  • Cc: k-user AT cs.uiuc.edu
  • Subject: Re: [K-user] (no subject)
  • Date: Mon, 19 Aug 2013 01:22:45 +0300
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/k-user/>
  • List-id: <k-user.cs.uiuc.edu>

Thanks Chris, your solution worked(with a minor change, I had to add
`...` after `rule incSomeMap(.Set, _) => .`).

In your code, what's happening here:

incSomeMap((SetItem(K:K) => .Set) _:Set, I:Int) ...

? As far as I can understand `SetItem(K:K) => .Set)` matches an
element of the set and replaces with unit(effectively removing the
element), but what is that _ after this? eg. _:Set ? My guess is that
_ unifies with rest of the set, is that correct? I think this is the
first time I'm seeing this syntax. Is there also similar syntax to
match match first element/rest of a map too?

---
Ömer Sinan Ağacan
http://osa1.net





Archive powered by MHonArc 2.6.16.

Top of Page