0

来自用户指南http://www.dobeash.com/RebDB/db-guide.html

我做了这个

>> record: make block! []
== []
>> append record 'next
== [next]
>> append record now/date
== [next 13-Sep-2009]
>> append record "test insert date"
== [next 13-Sep-2009 "test insert date"]
>> db-insert my-table record
== [4 13-Sep-2009 "test insert date"]
>>

任何更短的方法可以在一行中做到这一点?

4

1 回答 1

1

您可以使用COMPOSE

db-insert my-table compose [next (now/date) "test insert date"]

或者REDUCE

db-insert my-table reduce ['next now/date "test insert date"]
于 2009-09-14T00:29:00.253 回答