Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

10
LINES

< > BotCompany Repo | #1002726 // putMatch

JavaX fragment (include)

static boolean putMatch(Map<S, Lisp> matches, S key, Lisp val) {
  if (matches.containsKey(key))
    fail("multi-matching not implemented");
  matches.put(key, val);
  ret true;
}

static boolean putMatch(Map<S, Lisp> matches, S key, S val) {
  ret putMatch(matches, key, lisp(quote(val)));
  }

Author comment

Began life as a copy of #1002721

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1002726
Snippet name: putMatch
Eternal ID of this version: #1002726/1
Text MD5: 50c2471d41ad2b8868095e8c11cf6f9a
Author: stefan
Category: eleu / nl
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-02-18 02:22:54
Source code size: 303 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 659 / 603
Referenced in: #1002727 - putMatchX
#1006654 - Standard functions list 2 (LIVE, continuation of #761)
#3000382 - Answer for ferdie (>> t = 1, f = 0)