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

7
LINES

< > BotCompany Repo | #1019026 // f_id - identity function

JavaX fragment (include)

1  
static F1 f_id_value;
2  
3  
static <A> F1<A> f_id() {
4  
  if (f_id_value == null)
5  
    f_id_value = func(A a) -> A { ret a; };
6  
  ret f_id_value;
7  
}

Author comment

Began life as a copy of #1015749

download  show line numbers  debug dex  old transpilations   

Travelled to 12 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1019026
Snippet name: f_id - identity function
Eternal ID of this version: #1019026/2
Text MD5: be4bfdb4b7d005871667a40b171e00e0
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-21 14:18:45
Source code size: 144 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 312 / 346
Version history: 1 change(s)
Referenced in: [show references]