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

12
LINES

< > BotCompany Repo | #1021610 // ai_checkNumberCalculationFunction1

JavaX fragment (include)

1  
sbool ai_checkNumberCalculationFunction1(S f, L<Double> numbers) {
2  
  ret nempty(numbers) && ai_checkNumberCalculationFunction1(f, dropLast(numbers), last(numbers));
3  
}
4  
5  
sbool ai_checkNumberCalculationFunction1(S f, L<Double> numbers, double result) {
6  
  pcall {
7  
    double out = toDouble(ai_callNumberCalculationFunction(f, numbers));
8  
    if (out == result) true;
9  
    print("fail: " + out + " / " + result);
10  
  }
11  
  false;
12  
}

Author comment

Began life as a copy of #1021607

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1021610
Snippet name: ai_checkNumberCalculationFunction1
Eternal ID of this version: #1021610/10
Text MD5: 8e107a45c45acf359be1940ac1c9c71f
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-02-22 10:38:12
Source code size: 431 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 398 / 407
Version history: 9 change(s)
Referenced in: [show references]