sword_smith icon

pattern-matching-on-slice-from-vector

sword_smith | PRO | 04/25/21 12:02:29 PM UTC | 0 ⭐ | 8659 👁️ | Never ⏰ | []
Rust |

240 B

|

None

|

0 👍

/

0 👎

    fn normalize(self) {
        loop {
            match self.coefficients.as_slice() {
                [0, _] => {
                    self.coefficients.remove(0);
                }
                a => break,
            }
        }
    }

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎