From ebe1b0276e1a49693c913701a0f79d93e10a6578 Mon Sep 17 00:00:00 2001 From: "K. Lange" Date: Tue, 5 Jul 2022 11:43:11 +0900 Subject: [PATCH] Remove tupleOf builtin --- src/obj_tuple.c | 2 -- test/testIamVeryConfused.krk | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/obj_tuple.c b/src/obj_tuple.c index a8e43a7..c0d4157 100644 --- a/src/obj_tuple.c +++ b/src/obj_tuple.c @@ -315,8 +315,6 @@ void _createAndBind_tupleClass(void) { krk_defineNative(&tuple->methods, "__str__", FUNC_NAME(tuple,__repr__)); krk_finalizeClass(tuple); - BUILTIN_FUNCTION("tupleOf",krk_tuple_of,"Convert argument sequence to tuple object."); - ADD_BASE_CLASS(vm.baseClasses->tupleiteratorClass, "tupleiterator", vm.baseClasses->objectClass); vm.baseClasses->tupleiteratorClass->allocSize = sizeof(struct TupleIter); vm.baseClasses->tupleiteratorClass->_ongcscan = _tuple_iter_gcscan; diff --git a/test/testIamVeryConfused.krk b/test/testIamVeryConfused.krk index bea1837..db6d2af 100644 --- a/test/testIamVeryConfused.krk +++ b/test/testIamVeryConfused.krk @@ -11,5 +11,8 @@ print(l) let l = list(map(list,['test','test','test'])) print(l) +def tupleOf(*args): + return tuple(args) + let l = list(map(tupleOf,['foo','bar'],['baz','bix'],['three','args'],['four','args'])) print(l)