func c(_ g: @escaping (Int) -> Void) {}
func a() {
let f: ((Int) -> Void) -> Void
f = { (g) -> Void in
c(g)
}
}
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ echo 'import Dispatch; func f() {}; DispatchQueue.global(qos: .default).async { f() }; dispatchMain()'|swiftc - | |
$ lldb | |
(lldb) target create main | |
Current executable set to 'main' (x86_64). | |
(lldb) b f | |
Breakpoint 1: 9 locations. | |
(lldb) process launch -v DYLD_LIBRARY_PATH=/usr/lib/system/introspection -v DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/usr/lib/libBacktraceRecording.dylib | |
Process 33297 launched: '/Users/norio/github/swift-dev/SourceKitten/main' (x86_64) | |
Process 33297 stopped | |
* thread #2, queue = 'com.apple.root.default-qos', stop reason = breakpoint 1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
theory subseq imports "~~/src/HOL/Hoare/Hoare_Logic" begin | |
definition is_subseq :: "'a list => 'a list => bool" where | |
"is_subseq xs ys == | |
(\<exists>c. | |
(\<forall>i. i + 1 < length ys --> c i < c (i + 1)) | |
\<and> (length ys > 0 \<longrightarrow> c (length ys - 1) < length xs) | |
\<and> (\<forall>i. i < length ys \<longrightarrow> ys ! i = xs ! (c i)))" | |
fun is_subseq2 :: "'a list => 'a list => bool" where |
OlderNewer