BT
Size: a a a
BT
BT
cpp
extend box< Collection {
fn |T: iso Any, E: iso Exception| map
(using: fn (box< Self.Element) -throws: E -returns: T)
-throws: some iso Exception
-returns: some iso |Element: iso T| Collection {
var `result collection`: box = !recover: {
return
source_file.cpp:6:3: error: stray ‘`’ in program
var `result collection`: box = !recover: {
^
source_file.cpp:6:3: error: stray ‘`’ in program
source_file.cpp:1:1: error: ‘extend’ does not name a type
extend box< Collection {
^
cplusplus_gcc assumed, other valid options are cplusplus_clang, visual_cplusplus, you can be more specific next time.
🎄T
extend box< Collection {
fn |T: iso Any, E: iso Exception| map
(using: fn (box< Self.Element) -throws: E -returns: T)
-throws: some iso Exception
-returns: some iso |Element: iso T| Collection {
var `result collection`: box = !recover: {
return |T|Collection.`create default empty collection`(`with initial capacity`: self.count);
};
self.forEach(do: fn {
`result collection`.append(transformer($0));
});
return `result collection`;
};
fn |T: iso Any, E: iso Exception| `safely map`
(using transformer: fn (Self.ELement) -sealed -throws: E -returns: T)
-throws: some iso Exception
-returns: some val |Element: box T| Collection {
var `result collection`: box = !recover: {
return |T|Collection.`create default empty collection`(`with initial capacity`: self.count);
};
self.forEach(do: fn {
`result collection`.append(transformer($0));
});
return `result collection`;
};
};
tr
extend box< Collection {
fn |T: iso Any, E: iso Exception| map
(using: fn (box< Self.Element) -throws: E -returns: T)
-throws: some iso Exception
-returns: some iso |Element: iso T| Collection {
var `result collection`: box = !recover: {
return |T|Collection.`create default empty collection`(`with initial capacity`: self.count);
};
self.forEach(do: fn {
`result collection`.append(transformer($0));
});
return `result collection`;
};
fn |T: iso Any, E: iso Exception| `safely map`
(using transformer: fn (Self.ELement) -sealed -throws: E -returns: T)
-throws: some iso Exception
-returns: some val |Element: box T| Collection {
var `result collection`: box = !recover: {
return |T|Collection.`create default empty collection`(`with initial capacity`: self.count);
};
self.forEach(do: fn {
`result collection`.append(transformer($0));
});
return `result collection`;
};
};
🎄T
tr
S
tr
DM
DM
tr
🎄T
tr
tr
S
tr
GG
tr
tr