Libraryless. Click here for Pure Java version (2142L/14K).
1 | static <A> A first_warnIfMultiple(Collection<A> l) { |
2 | if (l(l) > 1) warn("Unexpected multitude: " + l); |
3 | ret first(l); |
4 | } |
Began life as a copy of #1015727
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1025313 |
Snippet name: | first_warnIfMultiple - get first element of list; warn() when more than one element |
Eternal ID of this version: | #1025313/1 |
Text MD5: | 5ce1bbf4d2b3c0d08f92830d85956062 |
Transpilation MD5: | 3ac7736bbb9c7955ba0114ee082c7b2a |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-09-21 21:59:22 |
Source code size: | 125 bytes / 4 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 281 / 335 |
Referenced in: | [show references] |