$ ruby --version
ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-darwin16]
$ bundle list | grep kitchen
* kitchen-ansible (0.45.9)
* kitchen-vagrant (1.0.1)
* test-kitchen (1.15.0)
This file contains hidden or 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
| count(List, X, Count) :- count_sub(List, X, 0, Count). | |
| count_sub([], _, N, N). | |
| count_sub([Head | Xs], X, N, Count) :- | |
| (Head == X -> N1 is N + 1; N1 is N), | |
| count_sub(Xs, X, N1, Count). | |
| % トランプの数は1〜13まで。 | |
| card(X) :- between(1, 13, X). | |
| % さやかのヒントにあてはまる。 |
This file contains hidden or 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
| {!(number|boolean)} | |
| {!Object} | |
| {!number|!string} | |
| {!{myNum: number}} | |
| {"foo.bar.baz"} | |
| {'foo.bar.baz'} | |
| {(Array.<string>|Object.<string, ?>)} | |
| {(Array|Object.<string, ?>)} | |
| {(Element|Object|Document|Object.<string, (string|function(!jQuery.event=))>)=} | |
| {(Error|function(): Error)} |
SET(Software Engineer in Test) のグループの元マネージャ。専門は ソフトウェアテスト/Lint/Git。実務経験のあるプログラミング言語は JavaScript, TypeScript, Swift, C#, Go, Isabelle, OCaml, F#(コードは OSS を参照)。
(2025/12 現在)転職活動はしていません。
This file contains hidden or 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
| // 問題: コンパイルエラーもしくは実行時警告になる testX 関数をすべて答えてください。 | |
| import XCTest | |
| class SE0176PlaygroundTests: XCTestCase { | |
| func test1() { | |
| struct ExampleStruct { | |
| mutating func assignedBy(_ block: () -> ExampleStruct) { | |
| self = block() |
This file contains hidden or 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
| import _SwiftXCTestOverlayShims | |
| public extension XCTContext { | |
| // XXX: This is for AppCode. The original of runActivity have been failed on only AppCode. | |
| // This cause is __XCTContextShouldStartActivity, it returns true when it is called on Xcode, but not on AppCode. | |
| public class func runActivityPatched<Result>(named name: String, block: (XCTActivity) throws -> Result) rethrows -> Result { | |
| let context = _XCTContextCurrent() | |
| return try autoreleasepool { | |
| let activity = _XCTContextWillStartActivity(context, name, XCTActivityTypeUserCreated) |
This file contains hidden or 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
| public protocol PositiveInt: Equatable {} | |
| public struct Succ<T>: PositiveInt where T: PositiveInt { | |
| private let x: T | |
| fileprivate init(_ x: T) { self.x = x } | |
| } | |
| public struct Zero: PositiveInt { | |
| public static func ==(lhs: Zero, rhs: Zero) -> Bool { return true } | |
| } | |
| public typealias One = Succ<Zero> | |
| public typealias Two = Succ<One> |
This file contains hidden or 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
| %{ | |
| number_of_generated = 5 | |
| }% | |
| public struct PrefixedArray<Element, RestElements> { | |
| public let prefix: Element | |
| public let rest: RestElements | |
This file contains hidden or 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
| public enum Result<T, E> { | |
| case success(T) | |
| case failure(because: E) | |
| public var isSuccess: Bool { | |
| switch self { | |
| case .success: | |
| return true | |
| case .failure: |
This file contains hidden or 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
| class A { a: "a" = "a"; } | |
| class B { b: "b" = "b"; } | |
| interface X { | |
| a: Y<A>; | |
| b: Y<B>; | |
| } | |
| interface Y<T> { t: T; } | |
| type Z<T> = { [key in "a"]: Y<T> }; |