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

12
LINES

< > BotCompany Repo | #1021610 // ai_checkNumberCalculationFunction1

JavaX fragment (include)

sbool ai_checkNumberCalculationFunction1(S f, L<Double> numbers) {
  ret nempty(numbers) && ai_checkNumberCalculationFunction1(f, dropLast(numbers), last(numbers));
}

sbool ai_checkNumberCalculationFunction1(S f, L<Double> numbers, double result) {
  pcall {
    double out = toDouble(ai_callNumberCalculationFunction(f, numbers));
    if (out == result) true;
    print("fail: " + out + " / " + result);
  }
  false;
}

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: 322 / 337
Version history: 9 change(s)
Referenced in: [show references]