Skip to content

Commit 20aebf0

Browse files
committed
Include SRFI 236.
1 parent bb7687b commit 20aebf0

File tree

3 files changed

+58
-2
lines changed

3 files changed

+58
-2
lines changed

LispKit.xcodeproj/project.pbxproj

+6
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,8 @@
969969
CCCD1ABA298C6CE40057DCEB /* 233.sld in Copy pre-installed SRFI libraries */ = {isa = PBXBuildFile; fileRef = CCCD1AB8298C6BEE0057DCEB /* 233.sld */; };
970970
CCCD1ABC298C6DBF0057DCEB /* SRFI-233.scm in Copy tests */ = {isa = PBXBuildFile; fileRef = CCCD1ABB298C6D910057DCEB /* SRFI-233.scm */; };
971971
CCCD1ABD298C6DCC0057DCEB /* SRFI-233.scm in Copy tests */ = {isa = PBXBuildFile; fileRef = CCCD1ABB298C6D910057DCEB /* SRFI-233.scm */; };
972+
CCCD1ABF298C70C60057DCEB /* 236.sld in Copy pre-installed SRFI libraries */ = {isa = PBXBuildFile; fileRef = CCCD1ABE298C6FEA0057DCEB /* 236.sld */; };
973+
CCCD1AC0298C70D60057DCEB /* 236.sld in Copy pre-installed SRFI libraries */ = {isa = PBXBuildFile; fileRef = CCCD1ABE298C6FEA0057DCEB /* 236.sld */; };
972974
CCCEB3FF1DF2DAA9009BF66B /* FileHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCCEB3FE1DF2DAA9009BF66B /* FileHandler.swift */; };
973975
CCD3E15425C5ECC8007FCE8A /* prolog.sld in Copy pre-installed LispKit libraries */ = {isa = PBXBuildFile; fileRef = CCD3E15325C5EB83007FCE8A /* prolog.sld */; };
974976
CCD3E15925C638F5007FCE8A /* Schelog.scm in Copy examples */ = {isa = PBXBuildFile; fileRef = CCD3E15825C63898007FCE8A /* Schelog.scm */; };
@@ -1744,6 +1746,7 @@
17441746
dstPath = Root/LispKit/Libraries/srfi;
17451747
dstSubfolderSpec = 7;
17461748
files = (
1749+
CCCD1ABF298C70C60057DCEB /* 236.sld in Copy pre-installed SRFI libraries */,
17471750
CCCD1AB9298C6CD50057DCEB /* 233.sld in Copy pre-installed SRFI libraries */,
17481751
CCB7B0CF2960F15000F0DB20 /* 228.sld in Copy pre-installed SRFI libraries */,
17491752
CCCB5C9D28403E870005248D /* 118.sld in Copy pre-installed SRFI libraries */,
@@ -1857,6 +1860,7 @@
18571860
dstPath = Root/LispKit/Libraries/srfi;
18581861
dstSubfolderSpec = 7;
18591862
files = (
1863+
CCCD1AC0298C70D60057DCEB /* 236.sld in Copy pre-installed SRFI libraries */,
18601864
CCCD1ABA298C6CE40057DCEB /* 233.sld in Copy pre-installed SRFI libraries */,
18611865
CCB7B0D12960F17C00F0DB20 /* 228.sld in Copy pre-installed SRFI libraries */,
18621866
CCCB5C9E28403E960005248D /* 118.sld in Copy pre-installed SRFI libraries */,
@@ -2927,6 +2931,7 @@
29272931
CCCB66E3283056E30004827D /* StyledTextLibrary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StyledTextLibrary.swift; sourceTree = "<group>"; };
29282932
CCCD1AB8298C6BEE0057DCEB /* 233.sld */ = {isa = PBXFileReference; lastKnownFileType = text; path = 233.sld; sourceTree = "<group>"; };
29292933
CCCD1ABB298C6D910057DCEB /* SRFI-233.scm */ = {isa = PBXFileReference; lastKnownFileType = text; path = "SRFI-233.scm"; sourceTree = "<group>"; };
2934+
CCCD1ABE298C6FEA0057DCEB /* 236.sld */ = {isa = PBXFileReference; lastKnownFileType = text; path = 236.sld; sourceTree = "<group>"; };
29302935
CCCEB3FE1DF2DAA9009BF66B /* FileHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FileHandler.swift; sourceTree = "<group>"; };
29312936
CCD3E15325C5EB83007FCE8A /* prolog.sld */ = {isa = PBXFileReference; lastKnownFileType = text; path = prolog.sld; sourceTree = "<group>"; };
29322937
CCD3E15725C60FBC007FCE8A /* red.sld */ = {isa = PBXFileReference; lastKnownFileType = text; path = red.sld; sourceTree = "<group>"; };
@@ -3514,6 +3519,7 @@
35143519
CC2DA75C2787EBAE00DE69CF /* 230.sld */,
35153520
CC6E93C8281C9F820002C4BC /* 232.sld */,
35163521
CCCD1AB8298C6BEE0057DCEB /* 233.sld */,
3522+
CCCD1ABE298C6FEA0057DCEB /* 236.sld */,
35173523
);
35183524
path = srfi;
35193525
sourceTree = "<group>";

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
[![Platform: macOS | iOS](https://img.shields.io/badge/Platform-macOS%20%7C%20iOS-blue.svg?style=flat)](https://developer.apple.com/osx/)
55
[![Language: Swift 5.7](https://img.shields.io/badge/Language-Swift%205.7-green.svg?style=flat)](https://developer.apple.com/swift/)
6-
[![IDE: Xcode 14.1](https://img.shields.io/badge/IDE-Xcode%2014.1-orange.svg?style=flat)](https://developer.apple.com/xcode/)
6+
[![IDE: Xcode 14.2](https://img.shields.io/badge/IDE-Xcode%2014.2-orange.svg?style=flat)](https://developer.apple.com/xcode/)
77
[![Carthage: compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
88
[![License: Apache](http://img.shields.io/badge/License-Apache-lightgrey.svg?style=flat)](https://raw.githubusercontent.com/objecthub/swift-lispkit/master/LICENSE)
99

@@ -234,6 +234,8 @@ framework:
234234
- [SRFI 229: Tagged procedures](https://srfi.schemers.org/srfi-229/srfi-229.html)
235235
- [SRFI 230: Atomic Operations](https://srfi.schemers.org/srfi-230/srfi-230.html)
236236
- [SRFI 232: Flexible curried procedures](https://srfi.schemers.org/srfi-232/srfi-232.html)
237+
- [SRFI 233: INI files](https://srfi.schemers.org/srfi-233/srfi-233.html)
238+
- [SRFI 236: Evaluating expressions in an unspecified order](https://srfi.schemers.org/srfi-236/srfi-236.html)
237239

238240

239241
## Project
@@ -354,7 +356,7 @@ command-line tool, all that is needed is the Swift Package Manager. For compilin
354356
the command-line tool directly in Xcode, the Swift Package Manager is not needed.
355357

356358
- [Swift 5.7](https://developer.apple.com/swift/)
357-
- [Xcode 14.1](https://developer.apple.com/xcode/)
359+
- [Xcode 14.2](https://developer.apple.com/xcode/)
358360
- [Swift Package Manager](https://swift.org/package-manager/)
359361
- [NumberKit](http://github.com/objecthub/swift-numberkit)
360362
- [MarkdownKit](http://github.com/objecthub/swift-markdownkit)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
;;; SRFI 236
2+
;;; Evaluating expressions in an unspecified order
3+
;;;
4+
;;; This SRFI defines the independently syntax, which can be used to
5+
;;; combine side effects into one expression without specifying their
6+
;;; relative order.
7+
;;;
8+
;;; Copyright © 2022 Marc Nieper-Wißkirchen. All rights reserved.
9+
;;;
10+
;;; Permission is hereby granted, free of charge, to any person obtaining a copy
11+
;;; of this software and associated documentation files (the "Software"), to deal
12+
;;; in the Software without restriction, including without limitation the rights
13+
;;; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14+
;;; copies of the Software, and to permit persons to whom the Software is
15+
;;; furnished to do so, subject to the following conditions:
16+
;;;
17+
;;; The above copyright notice and this permission notice shall be included in all
18+
;;; copies or substantial portions of the Software.
19+
;;;
20+
;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21+
;;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
22+
;;; FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
23+
;;; COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
24+
;;; IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
25+
;;; CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26+
;;;
27+
;;; Adaptation to LispKit
28+
;;; Copyright © 2023 Matthias Zenger. All rights reserved.
29+
30+
(define-library (srfi 236)
31+
32+
(export independently)
33+
34+
(import (lispkit base))
35+
36+
(begin
37+
(define-syntax independently
38+
(syntax-rules ()
39+
((independently expr ...)
40+
(independently-aux (expr ...)))))
41+
(define-syntax independently-aux
42+
(syntax-rules ()
43+
((independently-aux () (expr tmp) ...)
44+
(let ((tmp (begin expr #f)) ...) (values)))
45+
((independently-aux (expr . exprs) . binds)
46+
(independently-aux exprs (expr tmp) . binds))))
47+
)
48+
)

0 commit comments

Comments
 (0)