mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
Exercise building erased function
This commit is contained in:
parent
a1eb641bb6
commit
d17d8c72ad
3 changed files with 51 additions and 17 deletions
|
@ -1357,6 +1357,13 @@ pub struct LambdaName<'a> {
|
|||
}
|
||||
|
||||
impl<'a> LambdaName<'a> {
|
||||
pub(crate) fn from_captures(symbol: Symbol, captures: &'a [InLayout<'a>]) -> Self {
|
||||
Self {
|
||||
name: symbol,
|
||||
niche: Niche(NichePriv::Captures(captures)),
|
||||
}
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
pub fn name(&self) -> Symbol {
|
||||
self.name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue