mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-20 13:31:30 +02:00
refactor
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
use <_impl/_sorted_impl.scad>;
|
use <_impl/_sorted_impl.scad>;
|
||||||
|
|
||||||
function sorted(lt, cmp = undef, key = undef) =
|
function sorted(lt, cmp = undef, key = undef) =
|
||||||
!is_undef(cmp) ? _sorted_cmp(lt, cmp) :
|
let(is_cmp_undef = is_undef(cmp))
|
||||||
!is_undef(key) ? _sorted_key(lt, key) :
|
is_cmp_undef && is_undef(key) ? _sorted_default(lt) :
|
||||||
_sorted_default(lt);
|
is_cmp_undef ? _sorted_key(lt, key) :
|
||||||
|
_sorted_cmp(lt, cmp);
|
Reference in New Issue
Block a user