소스 검색

Object.push(x) returns self, not x.

master
Ian Piumarta 11 달 전
부모
커밋
2983237af0
1개의 변경된 파일3개의 추가작업 그리고 4개의 파일을 삭제
  1. +3
    -4
      minproto.leg

+ 3
- 4
minproto.leg 파일 보기

@ -1,6 +1,6 @@
# minproto.leg -- minimal prototype langauge for semantic experiments
#
# last edited: 2024-05-29 10:02:58 by piumarta on zora
# last edited: 2024-05-29 11:05:04 by piumarta on zora
%{
;
@ -3550,9 +3550,8 @@ oop prim_Object_push(oop func, oop self, oop args, oop env)
{ assert(is(Object, args));
int argc = _get(args, Object,isize); assert(is(Object, self));
oop *indexed = _get(args, Object,indexed);
oop result = nil;
for (int i = 0; i < argc; ++i) result = Object_push(self, indexed[i]);
return result;
for (int i = 0; i < argc; ++i) Object_push(self, indexed[i]);
return self;
}
oop prim_Object_pop(oop func, oop self, oop args, oop env)

불러오는 중...
취소
저장