How to replace an item by another in a list in DrScheme when given paramters are two items and a list?

后端 未结 4 532
轻奢々
轻奢々 2021-01-21 18:42

How to replace an item by another in a list in DrScheme when given paramters are two items and a list?

4条回答
  •  清歌不尽
    2021-01-21 19:32

    Use map with a function which returns the replacement item when its argument is equal to the item you want to replace and the argument otherwise.

提交回复
热议问题